Author: Ronan Lamy <ronan.l...@gmail.com> Branch: py3.5 Changeset: r91324:ae338b18eb22 Date: 2017-05-17 19:12 +0100 http://bitbucket.org/pypy/pypy/changeset/ae338b18eb22/
Log: Run sys.__interactivehook__() also when using -i diff --git a/pypy/interpreter/app_main.py b/pypy/interpreter/app_main.py --- a/pypy/interpreter/app_main.py +++ b/pypy/interpreter/app_main.py @@ -694,8 +694,6 @@ del mainmodule.__file__ except (AttributeError, TypeError): pass - if hasattr(sys, '__interactivehook__'): - run_toplevel(sys.__interactivehook__) # Then we need a prompt. inspect = True else: @@ -791,6 +789,8 @@ if inspect_requested(): try: from _pypy_interact import interactive_console + if hasattr(sys, '__interactivehook__'): + run_toplevel(sys.__interactivehook__) pypy_version_info = getattr(sys, 'pypy_version_info', sys.version_info) irc_topic = pypy_version_info[3] != 'final' or ( readenv and os.getenv('PYPY_IRC_TOPIC')) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit