Skip to content

Run Python File in Terminal re-uses an occupied terminal which is not available #85

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

Closed
DonJayamanne opened this issue Nov 13, 2017 · 4 comments
Labels
area-terminal feature-request Request for new features or functionality

Comments

@DonJayamanne
Copy link

From @gandhis1 on February 8, 2017 21:33

Steps:

  1. Open a terminal. Type in "ipython" to use the interactive console. Start programming.
  2. In an open file, run the command "Run Python File in Terminal".
  3. Command attempts to execute in the running IPython console. This does not work.

image

Copied from original issue: DonJayamanne/pythonVSCode#723

@DonJayamanne
Copy link
Author

From @half1red on September 7, 2017 7:48

Hi,

I think there's two way of seeing this action:

  • launch a new shell terminal to execute the file with python $(file)
  • execute the file inside the ipython terminal with exec() or %run

the second one would be a great feature as it would allow one to keep the variables and functions in the kernel and play with them interactively. Today I don't think that is possible.

Do you think that would be a feature that could be put in your extension (which is awesome btw)?

Thank you for your work !

@jrwrigh
Copy link

jrwrigh commented Feb 24, 2018

I'd love this personally. I've been wanting some integration with an IPython terminal and VS Code. Jupyter's qtConsole would be better, but IPython is a start for sure.

Some auto detect would also be nice as well if possible. Like if it senses that an IPython console is open the it will run in there, but if it senses a standard console it'll just open a new terminal and run the code there.

@jpoeppel
Copy link

First of all: Thanks for your great work.
If I may jump in on this: I think both use cases are important. The 2nd is great when working with IPython/Jupyter, but the first is required, when one wants to execute multiple scripts at the same time. For this case I would love something like an "Run Python File in New Terminal" which launches a new Terminal and executes it there. (Or if that is easier, the ability to select an existing terminal to run the current file in, which would ideally be remembered so one does not always have to specify it).

@brettcannon
Copy link
Member

We now create a new terminal for your first launch and then subsequently re-use it going forward. This should solve the issue for the OP.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 11, 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
Projects
None yet
Development

No branches or pull requests

4 participants