Same question as
Sypder 2 IDE - keep the focus in the editor after sending selected commands to interpreter
but for JetBrains PyCharm. Using option-shift-e on a mac, I can send commands to the python console, but I have to press esc to return focus to the editor. Can I do the Rstudio-style / Emacs-ESS style execution where focus stays in the editor window?
Press Alt+F12 to open terminal within PyCharm, then write in the command you wish to run and press enter.
You can assign a shortcut to open Python console: press Ctrl+Alt+S, navigate to Keymap, specify a shortcut for Main menu | Tools | Python or Debug Console. The main reason for using the Python console within PyCharm is to benefit from the main IDE features, such as code completion, code analysis, and quick fixes.
Pycharm - Console. PyCharm has a full-fledged Python console with full code completion which is available in the option menu Tools -> Run Python Console. Now, let us run the code with the help of console to execute the script for getting the desired output, as shown below.
Context menu commands Command Description Compare with Clipboard Show selection in the console and conten ... Pause Output Pause the Python script execution output Create Gist Choose this command to create a Git Gist ... Clear All Choose this item from the context menu t ...
The line at caret loads into the Python console, and runs. By default, the Python console executes Python commands using the Python interpreter defined for the project. However, you can assign an alternative Python interpreter. In the Settings/Preferences dialog Ctrl+Alt+S, select Build, Execution, Deployment | Console | Python Console.
I'm using PyCharm 2.7.3 on Ubuntu 12.04 LTS with Netbeans keymap.
I can use CTRL+ALT+E
to execute selected command and for the first time the console has a focus, indeed (first time after lauching IDE). However, any further CTRL+ALT+E
leaves the focus on editor. (I can switch back to the console, which is named Run
, using ALT+4
.)
If newer versions of PyCharm are behaving differently then maybe it's a bug.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With