summaryrefslogtreecommitdiff
path: root/Tools/compiler/compile.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-09-17 21:31:35 +0000
committerJeremy Hylton <jeremy@alum.mit.edu>2001-09-17 21:31:35 +0000
commit63d6743c2f212ca68ba0b18d238991d437ebe574 (patch)
tree13581a66f2fad29f03c7be78e193109ecc4be728 /Tools/compiler/compile.py
parent29f233d651ba3ebc40eed3bb4114160b88ffc9a7 (diff)
downloadcpython-63d6743c2f212ca68ba0b18d238991d437ebe574.tar.gz
Track changes to compiler API
Diffstat (limited to 'Tools/compiler/compile.py')
-rw-r--r--Tools/compiler/compile.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/Tools/compiler/compile.py b/Tools/compiler/compile.py
index 1a843e2eb5..c90d8510f4 100644
--- a/Tools/compiler/compile.py
+++ b/Tools/compiler/compile.py
@@ -1,7 +1,7 @@
import sys
import getopt
-from compiler import compile, visitor
+from compiler import compileFile, visitor
import profile
@@ -35,14 +35,16 @@ def main():
print filename
try:
if PROFILE:
- profile.run('compile(%s, %s)' % (`filename`, `DISPLAY`),
+ profile.run('compileFile(%s, %s)' % (`filename`,
+ `DISPLAY`),
filename + ".prof")
else:
- compile(filename, DISPLAY)
+ compileFile(filename, DISPLAY)
except SyntaxError, err:
print err
- print err.lineno
+ if err.lineno is not None:
+ print err.lineno
if not CONTINUE:
sys.exit(-1)