Author: Philip Jenvey <[email protected]>
Branch: 
Changeset: r237:e7bdf8a4cfde
Date: 2013-04-14 14:36 -0700
http://bitbucket.org/pypy/pyrepl/changeset/e7bdf8a4cfde/

Log:    be consistent w/ the console's filename: '<stdin>', to match cpython

diff --git a/pyrepl/python_reader.py b/pyrepl/python_reader.py
--- a/pyrepl/python_reader.py
+++ b/pyrepl/python_reader.py
@@ -186,10 +186,10 @@
 
     def execute(self, text):
         try:
-            # ooh, look at the hack:            
-            code = self.compile(text, '<input>', 'single')
+            # ooh, look at the hack:
+            code = self.compile(text, '<stdin>', 'single')
         except (OverflowError, SyntaxError, ValueError):
-            self.showsyntaxerror("<input>")
+            self.showsyntaxerror("<stdin>")
         else:
             self.runcode(code)
             if sys.stdout and not sys.stdout.closed:
diff --git a/pyrepl/simple_interact.py b/pyrepl/simple_interact.py
--- a/pyrepl/simple_interact.py
+++ b/pyrepl/simple_interact.py
@@ -39,13 +39,13 @@
     import code
     import __main__
     mainmodule = mainmodule or __main__
-    console = code.InteractiveConsole(mainmodule.__dict__)
+    console = code.InteractiveConsole(mainmodule.__dict__, filename='<stdin>')
 
     def more_lines(unicodetext):
         # ooh, look at the hack:
         src = "#coding:utf-8\n"+unicodetext.encode('utf-8')
         try:
-            code = console.compile(src, '<input>', 'single')
+            code = console.compile(src, '<stdin>', 'single')
         except (OverflowError, SyntaxError, ValueError):
             return False
         else:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to