Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0a4f1ff

Browse files
committed
patches from Mark Hammond
compile.py: On Windows, use 'nul' instead of '/dev/null'. test.py: Use double-quotes for the command-line, as Windows doesnt recognise singles.
1 parent 7d64b48 commit 0a4f1ff

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Tools/compiler/compile.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ def main():
1111
VERBOSE = 1
1212
visitor.ASTVisitor.VERBOSE = visitor.ASTVisitor.VERBOSE + 1
1313
if k == '-q':
14-
f = open('/dev/null', 'wb')
14+
if sys.platform[:3]=="win":
15+
f = open('nul', 'wb') # /dev/null fails on Windows...
16+
else:
17+
f = open('/dev/null', 'wb')
1518
sys.stdout = f
1619
if not args:
1720
print "no files to compile"

0 commit comments

Comments
 (0)