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

Python REPL isn't restarted after exiting and rerunning shift+enter #22547

Open
joyceerhl opened this issue Nov 28, 2023 · 1 comment
Open

Python REPL isn't restarted after exiting and rerunning shift+enter #22547

joyceerhl opened this issue Nov 28, 2023 · 1 comment
Assignees
Labels
triage-needed Needs assignment to the proper sub-team

Comments

@joyceerhl
Copy link

Testing #22533

  1. Shift+enter to start a REPL and send some Python code to the REPL
  2. In the REPL, run exit()
  3. Now there is still a Python terminal
image 4. Shift+enter again 5. 🐛 the existing Python terminal is reused but the REPL isn't restarted, so my selection is just dumped straight to the command prompt

Can we use shell integration here to restart the Python REPL or even switch the terminal type back to powershell after the user types exit()? cc @Tyriar

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Nov 28, 2023
@Lauler
Copy link

Lauler commented Sep 10, 2024

This is still an issue, and has become even more of an issue lately.

  1. After a restart of VSCode, the IDE tries to be smart and remember (reopen) the shells that were open the previous time a user closed VSCode.
  2. The shell that was previously active as a Python REPL now becomes a regular bash/zsh/powershell shell after restarting VSCode.
  3. When the user highlights code and presses Shift+Enter, the Python code is "smartly" sent to the shell that Python was previously active (it says Python in the VSCode terminal, but in actuality the regular shell is active).
  4. Lots of import library_name are sent to the shell, causing the user's computer to freeze for several seconds as the shell deals with erroneous imports.
  5. Files are created with the names of the python libraries that were attempted to be imported in the shell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

3 participants