简体   繁体   中英

Running Python scripts simultaneously in VS Code

Consider the following scenario: I have two Python scripts, the first a long-running process and the second a short-running process. I heavily use the shift + enter shortcut to run code directly from my .py files.

Currently in VS Code, I can only manage to have the interactive environment with one script. That is, if I run the first, long-running script and then open a new Python terminal window, running a line such as print('hello world') will run in the first terminal. I want to learn how to change the shift + enter so that it executes in the second, newly-opened terminal window.

I've looked at a few SO questions, namely this one, but the solutions either don't work or are not applicable to my use case.

I managed to execute in the newly-opened terminal window typing a command there. Not as convenient as shift + enter but does the job.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM