[pypy-commit] pypy default: merge heads
mattip
noreply at buildbot.pypy.org
Sun Apr 14 23:41:23 CEST 2013
Author: mattip <matti.picus at gmail.com>
Branch:
Changeset: r63350:3c141c06dda8
Date: 2013-04-15 00:41 +0300
http://bitbucket.org/pypy/pypy/changeset/3c141c06dda8/
Log: merge heads
diff --git a/lib_pypy/_pypy_interact.py b/lib_pypy/_pypy_interact.py
--- a/lib_pypy/_pypy_interact.py
+++ b/lib_pypy/_pypy_interact.py
@@ -44,7 +44,7 @@
import code
if mainmodule is None:
import __main__ as mainmodule
- console = code.InteractiveConsole(mainmodule.__dict__)
+ console = code.InteractiveConsole(mainmodule.__dict__, filename='<stdin>')
# some parts of code.py are copied here because it seems to be impossible
# to start an interactive console without printing at least one line
# of banner
diff --git a/lib_pypy/pyrepl/python_reader.py b/lib_pypy/pyrepl/python_reader.py
--- a/lib_pypy/pyrepl/python_reader.py
+++ b/lib_pypy/pyrepl/python_reader.py
@@ -171,11 +171,11 @@
def execute(self, text):
try:
- # ooh, look at the hack:
+ # ooh, look at the hack:
code = self.compile("# coding:utf8\n"+text.encode('utf-8'),
- '<input>', 'single')
+ '<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/lib_pypy/pyrepl/simple_interact.py b/lib_pypy/pyrepl/simple_interact.py
--- a/lib_pypy/pyrepl/simple_interact.py
+++ b/lib_pypy/pyrepl/simple_interact.py
@@ -37,13 +37,13 @@
import code
if mainmodule is None:
import __main__ as mainmodule
- 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:
More information about the pypy-commit
mailing list