mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
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.
This commit is contained in:
parent
7d64b48eaf
commit
0a4f1ff64e
1 changed files with 4 additions and 1 deletions
|
@ -11,7 +11,10 @@ def main():
|
|||
VERBOSE = 1
|
||||
visitor.ASTVisitor.VERBOSE = visitor.ASTVisitor.VERBOSE + 1
|
||||
if k == '-q':
|
||||
f = open('/dev/null', 'wb')
|
||||
if sys.platform[:3]=="win":
|
||||
f = open('nul', 'wb') # /dev/null fails on Windows...
|
||||
else:
|
||||
f = open('/dev/null', 'wb')
|
||||
sys.stdout = f
|
||||
if not args:
|
||||
print "no files to compile"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue