forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed as not planned
Labels
area-terminalbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugneeds PRReady to be worked onReady to be worked on
Description
- Use pipenv for current environment
- Run python file in terminal
- Open python file , right click and use the menu option
Run Python file in terminal - The terminal will now open automatically
- Python Extension will send the text
pipenv shellto activate the environment in the terminal - The python extension will send the text
<python interpreter> <file name>to the terminal - Unfortunately there's a race condition here,
pipenv shellhas not yet completed, and the commands sent later get swallowed up
- Open python file , right click and use the menu option
- End result, file doesn't run in terminal
Causes:
- There's no way to determine when terminal has completed processing previously sent commands.
- VSC is sending messages to the terminal, when its busy
Solutions:
- Python extension adds a delay between the two commands being sent to the terminal (this is what we do today). However
pipenv shelltakes longer than other activation routines, hence we need a much longer delay (i.e. a bigger magic number), a work around. - Or, VSC provides some api to let us know the terminal is ready to accept input.
giuscri, mbovel and Arcitec
Metadata
Metadata
Assignees
Labels
area-terminalbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugneeds PRReady to be worked onReady to be worked on