PyCharm 2019.2 Help

Interactive Console


In this section:

Important notes

  • Python console appears as a tool window 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.

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

  • Python 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 Color Scheme editor settings.

Toolbar

Item

Tooltip and shortcut

Description

rerunConsole

Rerun console
Ctrl+F5

Click this button to terminate the current process and launch the new one.

the Stop button

Stop
Ctrl+F2

Click this button to stop the current process.

Clicking the button once invokes soft kill allowing the application to catch the SIGINT event and perform graceful termination (on Windows, the Ctrl+C event is emulated). After the button is clicked once, it is replaced with the Kill Process button indicating that subsequent click will lead to force termination of the application, e.g. on Unix SIGKILL is sent.

the Close button

Close
Ctrl+Shift+F4

Click this button to close the selected tab of the Run tool window and terminate the current process.

Run command

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.

Debugger watches

Show variables

Click this button to show in a separate pane the variables declared in the console. Right-click a variable in this pane reveals a context menu.

Browse Console History

Browse History
Ctrl+Alt+E

Open a dialog that shows all the statements that you have run for the corresponding data source.

See also, View history of executed statements.

icons actions startDebugger svg

Attach Debugger

Attaches the debugger process to the console.

icons general add svg

New Console

Click this button to start a new console session.

Context menu commands

Command

Shortcut

Description

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.

icons actions gc svgClear All

Choose this item on the context menu to delete all messages from the upper part of the console.

Last modified: 6 November 2019