Skip to content

Cant run multiple python files at once #237

Closed

Description

@elunty

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:

Activity

  1. DonJayamanne commented on Nov 16, 2017

    @DonJayamanne

    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?

  2. brettcannon commented on Nov 16, 2017

    @brettcannon
    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.

  3. elunty commented on Nov 16, 2017

    @elunty
    Author

    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..

  4. brettcannon commented on Nov 16, 2017

    @brettcannon
    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.

  5. elunty commented on Nov 16, 2017

    @elunty
    Author

    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..

  6. kerv commented on Nov 16, 2017

    @kerv

    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!

  7. locked as resolved and limited conversation to collaborators on Jul 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-terminalfeature-requestRequest for new features or functionalityinfo-neededIssue requires more information from poster

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions