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
{{ message }}
Repository navigation
Interpreter crashes when given non-existent file in interactive mode #919
See below. Running the same command with python3 versus bpython and py3 prints a short error message and then opens the interpreter, but bpy just crashes.
bpython % python3 -i file_that_does_not_exist.py
/Library/Developer/CommandLineTools/usr/bin/python3: can't open file 'file_that_does_not_exist.py': [Errno 2] No such file or directory
>>> ^D
bpython % bpython -i file_that_does_not_exist.py
Traceback (most recent call last):
File "/Users/arian/Library/Python/3.8/bin/bpython", line 8, in <module>
sys.exit(main())
File "/Users/arian/Library/Python/3.8/lib/python/site-packages/bpython/curtsies.py", line 181, in main
bpargs.exec_code(interp, exec_args)
File "/Users/arian/Library/Python/3.8/lib/python/site-packages/bpython/args.py", line 161, in exec_code
with open(args[0]) as sourcefile:
FileNotFoundError: [Errno 2] No such file or directory: 'file_that_does_not_exist.py'
bpython %
Activity
Behave like python3 when executing files with -i (fixes bpython#919)