PyCharm 4.5.3 Help

Interactive Console

Tools | Run Python Console

Tools | Run Django Console


In this section:

Important notes

  • Python and/or Django consoles appear as tool windows every time you choose the corresponding command on the Tools menu.
  • An interactive console is divided into two panes: the lower pane serves for user input, the upper pane displays results and messages.
  • Django console is only available for the Django applications.
  • Only Python console is available in all editions of PyCharm; Django console is only available in Professional edition.
  • Use up and down arrow keys to browse through the history of executed commands, and repeat the desired ones.
  • PyCharm console is available for both local and remote interpreters.
  • Color and font scheme of a console is configurable on the Console Colors and Console Fonts pages of the Colors and Fonts editor settings.

Toolbar

ItemTooltip and shortcutDescription
rerunConsole Rerun console
Ctrl+F5
Click this button to terminate the current process and launch the new one.
stop Stop
Ctrl+F2
Click this button to stop the current process.
close.png Close
Ctrl+Shift+F4
Click this button to close the selected tab of the Run tool window and terminate the current process.
runBuild Execute Current Statement
Enter.
Click this button to execute the command at caret, entered in the input pane of the console.
help Help
F1
Use this icon or shortcut to open the corresponding help page.
show-watches Show variablesClick this button to show in a separate pane the variables declared in the console. Right-click on a variable in this pane reveals a context menu.
consoleHistory Browse History
Ctrl+Alt+E
Use this icon or shortcut to open a dialog that shows all the statements that you have run for the corresponding data source.

See also, Executing auto-memorized statements.

debugAttach DebuggerAttaches the debugger process to the console.
addNew ConsoleClick this button to start a new console session.

Context menu commands

CommandShortcutDescription
Copy Reference Ctrl+Shift+Alt+C Choose this command to put reference to the symbol at caret to the Clipboard.
Compare with ClipboardShow selection in the console and contents of the Clipboard in the Differences viewer.
gistCreate GistChoose this command to create a Git Gist.
clear_allClear AllChoose this item on the context menu to delete all messages from the upper part of the console.
Paste Ctrl+V Insert the last entry of the Clipboard next to the caret position in the lower part of the console.
Paste from History Ctrl+Shift+V Insert selected entry of the Clipboard next to the caret position in the lower part of the console.
Paste Simple Ctrl+Shift+V Insert selected entry of the Clipboard as plain text, next to the caret position in the lower part of the console.

See Also

Last modified: 29 June 2015