You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pypy -i -c 'exit(-1)' did not provide an interactive pypy console on exit, and so do any script exited with the obvious exit function; sys.exit is unaffected.
I use pypy2, so more versions are not tested, I would suggest that anyone test this on all platforms.
[dummy@f2e2157eeb03 project]$ pypy -i -c 'import sys;sys.exit(-1)'
Traceback (most recent call last):
File "<builtin>/app_main.py", line 76, in handle_sys_exit
SystemExit: -1
>>>>
[dummy@f2e2157eeb03 project]$ pypy -i -c 'exit(-1)'
Traceback (most recent call last):
File "<builtin>/app_main.py", line 76, in handle_sys_exit
SystemExit: -1
Traceback (most recent call last):
File "/usr/lib64/pypy-6.0/lib_pypy/_pypy_interact.py", line 30, in interactive_console
if not os.isatty(sys.stdin.fileno()):
ValueError: I/O operation on closed file
[dummy@f2e2157eeb03 project]$ python -i -c 'import sys;sys.exit(-1)'
Traceback (most recent call last):
File "<string>", line 1, in <module>
SystemExit: -1
>>>
[dummy@f2e2157eeb03 project]$ python -i -c 'exit(-1)'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib64/python2.7/site.py", line 355, in __call__
raise SystemExit(code)
SystemExit: -1
>>>
[dummy@f2e2157eeb03 project]$ pypy --version
Python 2.7.13 (1d8462e42c37, Aug 30 2018, 09:58:57)
[PyPy 6.0.0 with GCC 8.2.1 20180801 (Red Hat 8.2.1-2)]
The text was updated successfully, but these errors were encountered:
That's not really a difference to CPython though. in CPython you do get a prompt and you can use it somewhat, but sys.stdin is still closed, and things like raw_input don't work. The difference is that in PyPy the interactive prompt is built on top of sys.stdin. So I fear we are a bit stuck with this behaviour.
In Heptapod by bitbucket_importer on Mar 27, 2019, 05:05
Created originally on Bitbucket by thiner_never_stop_exploiting (wrq)
pypy -i -c 'exit(-1)'
did not provide an interactive pypy console on exit, and so do any script exited with the obvious exit function;sys.exit
is unaffected.I use pypy2, so more versions are not tested, I would suggest that anyone test this on all platforms.
The text was updated successfully, but these errors were encountered: