diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2001-02-09 08:56:30 (GMT) |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2001-02-09 08:56:30 (GMT) |
commit | 6b71e747b19c41e0665ee14eb755c924a40dd774 (patch) | |
tree | ba208a6616870c43672678ad07b772435aef6fa0 /Lib/py_compile.py | |
parent | 141971f22a1269e782b1481779f766629ac83afc (diff) | |
download | cpython-6b71e747b19c41e0665ee14eb755c924a40dd774.zip cpython-6b71e747b19c41e0665ee14eb755c924a40dd774.tar.gz cpython-6b71e747b19c41e0665ee14eb755c924a40dd774.tar.bz2 |
String method conversion.
Diffstat (limited to 'Lib/py_compile.py')
-rw-r--r-- | Lib/py_compile.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/py_compile.py b/Lib/py_compile.py index b453109..da3bdaf 100644 --- a/Lib/py_compile.py +++ b/Lib/py_compile.py @@ -59,10 +59,10 @@ def compile(file, cfile=None, dfile=None): try: codeobject = __builtin__.compile(codestring, dfile or file, 'exec') except SyntaxError, detail: - import traceback, sys, string + import traceback, sys lines = traceback.format_exception_only(SyntaxError, detail) for line in lines: - sys.stderr.write(string.replace(line, 'File "<string>"', + sys.stderr.write(line.replace('File "<string>"', 'File "%s"' % (dfile or file))) return if not cfile: |