Home » Support » Index of All Documentation » Wing IDE Reference Manual »

7. Interactive Python Shell

Wing provides an integrated Python Shell for execution of commands and experimental evaluation of expressions. The version of Python used in the Python Shell, and the environment it runs with, is configured in your project using Project Properties.

This shell runs a separate Python process that is independent of the IDE and functions without regard to the state of any running debug process. In Wing Professional, the Debug Probe can be used to interact in a similar way with your debug process. For details see Interactive Debug Probe.

Convenient ways to run parts of your source code in the shell include:

Copy/Paste part of a file -- Wing will automatically adjust leading indentation so the code can be executed in the shell.

Drag and Drop part of a file -- This works like Copy/Paste.

Evaluate File in Python Shell -- This command in the Source menu will evaluate the top level of the current file in the shell.

Evaluate Selection in Python Shell -- The command in the Source menu and editor's context menu (right-click) will evaluate the current selection in the shell.

Options menu This menu in the Python Shell tool contains items for evaluating the current file or selection

To restart the Python Shell, select Restart Shell from the Options menu in the top right of the tool. This will terminate the external Python process and restart it, clearing and resetting the state of the shell.

To save the contents of the shell, use Save a Copy in the Options menu or right-click context menu. The right-click context menu also provides items for copying and pasting text in the shell.

« 6.4. Browser Keyboard NavigationTable of Contents7.0. Python Shell Auto-completion »

Section Contents

7.0. Python Shell Auto-completion
7.1. Python Shell Options