How to run selected code in a new Python Console?

I know I can reset the python console using Ctrl + F5, but it also runs the python file specific in the script path in the Run configuration. I also know that I can run specific line/selection using the Alt + Shift + E.

I want to mix this two commands. I want to run the selected code in a new python console.

Is there any way to achieve this?


Comment actions Permalink



Regrettably, this option is not available, please submit a feature request at

Information on how to use YouTrack:

Comment actions Permalink

I am not sure if it would be important to a lot of people, but I've found a work around.

Set an empty python file/module in the Script path. Now every time I press Ctrl+F5, I get a fresh python terminal with no states.


Please sign in to leave a comment.