]> granicus.if.org Git - python/commitdiff
patches from Mark Hammond
authorJeremy Hylton <jeremy@alum.mit.edu>
Tue, 2 May 2000 22:29:46 +0000 (22:29 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Tue, 2 May 2000 22:29:46 +0000 (22:29 +0000)
compile.py:
On Windows, use 'nul' instead of '/dev/null'.

test.py:
Use double-quotes for the command-line, as Windows doesnt recognise
singles.

Tools/compiler/compile.py

index 7d6facf059a3c21ab1f6cb5337e852cbdddd26b2..5d82c3ded35d95f132f00a887aa4b2b1748cde5e 100644 (file)
@@ -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"