Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I run the current file in PyCharm

Tags:

python

pycharm

How can I run the current file in PyCharm? I would like a single hotkey that will execute the current file (whether normal file, scratch file, or scratch buffer) using the project default python interpreter. I would like to NOT have to create a custom run configuration, but just launch with the default Python configuration. Is such a thing possible?

like image 497
alvion Avatar asked May 05 '17 14:05

alvion


People also ask

How do you see what is running in PyCharm?

View running processesFrom the main menu, select Run | Show Running List. In the top-right corner of the editor, PyCharm shows a list with all active applications .


1 Answers

As it turns out, the action I was seeking is "Run context configuration" (or "Debug context configuration" for debugging). The default key binding on Windows is ctrl+shift+f10, or ctrl+option+R on Mac, as Ev. Kounis pointed out, although you can bind it to any key you like.

These settings can be found under the "Other" section in File->Settings->Keymap. The easiest way to find them is to simply use the search box.

like image 55
alvion Avatar answered Sep 23 '22 04:09

alvion