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

Cant run multiple python files at once #237

Closed
elunty opened this issue Nov 16, 2017 · 6 comments
Closed

Cant run multiple python files at once #237

elunty opened this issue Nov 16, 2017 · 6 comments
Labels
area-terminal feature-request Request for new features or functionality info-needed Issue requires more information from poster

Comments

@elunty
Copy link

elunty commented Nov 16, 2017

Environment data

VS Code version: 1.18.0
Python Extension version: 0.8.0
Python Version: 2.7.6
OS and version: Windows 7 64bit

Actual behavior

Using the "run python in terminal" context menu option on multiple files will not launch extra terminals

Expected behavior

I would have thought you could have one terminal every time you wanted to run your code

Steps to reproduce:

@DonJayamanne DonJayamanne added awaiting 1-decision area-terminal feature-request Request for new features or functionality labels Nov 16, 2017
@DonJayamanne
Copy link

Using the "run python in terminal" context menu option on multiple files will not launch extra terminals

How do you do this? How are you selecting multiple files today?

@DonJayamanne DonJayamanne added the info-needed Issue requires more information from poster label Nov 16, 2017
@brettcannon
Copy link
Member

Thanks for the idea, but this is one of those things where you can't make all the people happy all the time because some people don't want a new terminal for every execution (because that would be the option here, not a single terminal for each file, but a new terminal for every execution of code). And since we have not seen an obvious trend towards requesting a new terminal per execution we prefer to stay with the current solution.

@elunty
Copy link
Author

elunty commented Nov 16, 2017

How do you do this? How are you selecting multiple files today?

I just meant run one file, and try to start another while file 1 is running. I suppose most people probably use python for small short scripts that dont take long to finish.. but that isnt the case for me. I may just be a rare case..

@brettcannon
Copy link
Member

People use Python for everything, from short scripts to running Instagram. 😃 It's just that in this case you're basically asking us to become a parallel code executor and we would rather not have to maintain such support. If you want to execute multiple files at once you could consider a shell script or using something like subprocess in Python's stdlib to run multiple files simultaneously.

@elunty
Copy link
Author

elunty commented Nov 16, 2017

Ah its all good, https://marketplace.visualstudio.com/items?itemName=colinkaopu.externalcommand works fine for me to call python file.py with a shortcut in an external terminal. My journey of searching for ways to run it and complaining on github is done..

@kerv
Copy link

kerv commented Nov 16, 2017

I also have this problem. I don't think @elunty was asking for parallel scripts to run, rather he wants to launch a script to process something and then continue working on something else, possibly launching a second script externally or within the integrated terminal.

In my case, we have some heavy algorithmic python scripts that take hours to run depending on the data sets they are processing. Typically we need to make minor tweaks to be able to run them, so opening the script, making a change and then launching it in an external program is all we need. While that one script is running, opening another script to continue working and running is ideal. @elunty suggested using the externalcommand extension and does exactly what he was talking about here, where you can just launch python.exe myfile.py and just let it run.

I guess the problem really stems down on the tasks.json. Having the ability to specify to launch an external program with parameters, and just have it run, not attaching to the output is the ultimate feature request here. For now, the extension will do the job.

Thanks!

@lock lock bot locked as resolved and limited conversation to collaborators Jul 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-terminal feature-request Request for new features or functionality info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

4 participants