PyCharm 3.4.0 Web Help

Some features described here are available in Professional edition only.

Tools | Run Python Console

The following is available only in the Professional edition of PyCharm

Tools | Run Django Console


Python and/or Django consoles appear in the separate tabs of the Run tool window every time you choose the corresponding command on the Tools menu.

Important notes

Note

  • 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.

Color and font scheme of a console is configurable on the Console Colors and Console Fonts pages of the Colors and Fonts editor settings.

An interactive console is divided into two panes: the lower pane serves for user input, the upper pane displays results and messages.

Item Tooltip and shortcut Description
2.7+ rerunConsole Rerun console
Ctrl+F5Ctrl+F5Ctrl+5Ctrl+F5Ctrl+F5Ctrl+F5Ctrl+F5Ctrl+F11Command RControl F5Command R
Click this button to terminate the current process and launch the new one.
stop Stop
Ctrl+F2Ctrl+F2Ctrl+2Ctrl+F2Ctrl+F2Shift+F5Shift+F5 or Ctrl+Shift+DeleteCtrl+F2Command F2Command F2Command F2
Click this button to stop the current process.
close.png Close
Ctrl+Shift+F4Ctrl+Shift+F4Ctrl+Shift+4Ctrl+Shift+F4Ctrl+Shift+F4Ctrl+Shift+F4Ctrl+Shift+F4Ctrl+WControl Shift F4Shift Command F4Command W
Click this button to close the selected tab of the Run tool window and terminate the current process.
runBuild Execute Current Statement
EnterEnterEnterEnterEnterEnterEnterEnterEnterEnterEnter.
Click this button to execute the command at caret, entered in the input pane of the console.
help.gif Help
F1F1F1F1F1F1F1F1ContextHelpF1ContextHelp
Use this icon or shortcut to open the corresponding help page.
3.0+ show-watches Show variables Click 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.
3.1+ consoleHistory Browse History
Ctrl+Alt+ECtrl+Alt+ECtrl+Alt+ECtrl+Alt+ECtrl+Alt+ECtrl+Alt+ECtrl+Alt+ECtrl+Alt+EAlt Command EAlt Command EAlt Command E
Use this icon or shortcut to open a dialog that shows all the statements that you have run in the console.

See also, Executing auto-memorized statements.

Context menu commands

Command Shortcut Description
Copy Reference Ctrl+Shift+Alt+CCtrl+Shift+Alt+CCtrl+Shift+Alt+CCtrl+Shift+Alt+CCtrl+Shift+Alt+CCtrl+Shift+Alt+CCtrl+Shift+Alt+CCtrl+Shift+Alt+CShift Alt Command CShift Alt Command CShift Alt Command C Choose this command to put reference to the symbol at caret to the Clipboard.
Compare with Clipboard Show selection in the console and contents of the Clipboard in the Differences viewer.
gistCreate Gist Choose this command to create a Git Gist.
clear_allClear All Choose this item on the context menu to delete all messages from the upper part of the console.
Paste Ctrl+V or Shift+InsertCtrl+V or Shift+InsertCtrl+V or Shift+InsertCtrl+V or Shift+InsertAlt+P, Shift+Insert or Ctrl+YCtrl+V or Shift+InsertCtrl+V or Shift+InsertCtrl+V or Shift+InsertCommand V or Shift InsertCommand V or Shift InsertCommand V or Shift Insert 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 or Ctrl+Shift+InsertCtrl+Shift+V or Ctrl+Shift+InsertCtrl+Shift+V or Ctrl+Shift+InsertCtrl+Shift+V or Ctrl+Shift+InsertAlt+YCtrl+Shift+V or Ctrl+Shift+InsertCtrl+Shift+V or Ctrl+Shift+InsertCtrl+Shift+V or Ctrl+Shift+InsertShift Command V or Shift Command InsertShift Command V or Shift Command InsertShift Command V or Shift Command Insert Insert selected entry of the Clipboard next to the caret position in the lower part of the console.
Paste Simple Ctrl+Shift+V or Ctrl+Shift+InsertCtrl+Shift+V or Ctrl+Shift+InsertCtrl+Shift+V or Ctrl+Shift+InsertCtrl+Shift+V or Ctrl+Shift+InsertAlt+YCtrl+Shift+V or Ctrl+Shift+InsertCtrl+Shift+V or Ctrl+Shift+InsertCtrl+Shift+V or Ctrl+Shift+InsertShift Command V or Shift Command InsertShift Command V or Shift Command InsertShift Command V or Shift Command Insert Insert selected entry of the Clipboard as plain text, next to the caret position in the lower part of the console.

Tip

Use up and down arrow keys to browse through the history of executed commands, and repeat the desired ones.

2.7.2+

Tip

PyCharm console is available for both local and remote interpreters.

See Also

Procedures:

Getting Started:

Web Resources: