STINNER Victor <[email protected]> added the comment:
A workaround is the usage of -I option: vstinner@apu$ PYTHONPATH=: python3 -c "" Fatal Python error: init_sys_streams: can't initialize sys standard streams Traceback (most recent call last): File "/usr/lib64/python3.7/io.py", line 52, in <module> File "/tmp/demo/abc.py", line 1, in <module> Exception: Hi Aborted (core dumped) vstinner@apu$ PYTHONPATH=: python3 -I -c "" <it works as expected> A long term solution would to enable -I behavior by default: don't add the current directory to sys.path when using -c CMD. ---------- _______________________________________ Python tracker <[email protected]> <https://bugs.python.org/issue35969> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
