Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Keep REPL open after error in script execution #557

Open
sohang3112 opened this issue Nov 1, 2023 · 1 comment
Open

Comments

@sohang3112
Copy link

sohang3112 commented Nov 1, 2023

When running ptpython -i file.py, if an error occurs, ptpython currently prints the error and exits. This differs from the behaviour of python -i file.py, which prints the traceback and then opens the REPL, preserving the variables of file.py up to the point where the error occurred.

This would be especially useful because I can fix whatever error occurred, then manually continue execution using the script variables (which could be loaded from slow functions like API requests).

Note: I'm using ptpython version 3.0.23

@sohang3112
Copy link
Author

ipython -i file.py also does this correctly - it opens its REPL if the script execution fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant