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

Running Python Files in Interactive Mode #19442

Closed
amin2783 opened this issue Jul 11, 2022 · 2 comments
Closed

Running Python Files in Interactive Mode #19442

amin2783 opened this issue Jul 11, 2022 · 2 comments
Assignees
Labels
area-terminal triage-needed Needs assignment to the proper sub-team

Comments

@amin2783
Copy link

Running a python file (with python extension installed) runs the file in terminal, then exits. It would be better in some cases if the file was opened in REPL, just like in IDLE.

A workaround is to select all, then Shift+Enter, but that's a problem if there are some outputs before the file ends.

Currently, on linux, running the file issues the following command in the terminal "path/to/python /path/to/file/file.py". Please allow to use an alternative command "python3 -i /path/to/file/file.py" or "path/to/python -i path/to/file/file/py" so that the file is opened in interactive mode.

Thanks!

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jul 11, 2022
@amin2783
Copy link
Author

UPDATE: After some more digging, I have found the python.terminal.launchargs option. It works, but does not close the previous REPL if again pressed with the REPL open, and throws an error.

Thanks!

@karrtikr karrtikr self-assigned this Jul 11, 2022
@karrtikr
Copy link

Your issue seems to possibly related to #2997 #11435. Also, we have plans to support #17172 which should also help in scenario, closing this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-terminal triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

2 participants