Tutorial: Other IDE Features

Index of All Documentation » Wing Pro Tutorial »


By now you have seen many of the IDE's features. Before we call it a day, let's look at a few other major features that are worth knowing about.

Remote Development

Wing Pro makes it possible to work with Python source code that resides on a remote host, container, or virtual machine. This is done by setting up SSH access to the remote host, then configuring Wing using Remote Hosts in the Project menu, and pointing Python Executable in Project Properties at that remote host.

Once this is done, remote files and directories can be added to the project with Add Existing Directory in the Project menu. Then Wing will be able to edit, debug, test, search, inspect, refactor, and manage remote files, and it can run Python Shell and OS Commands on the remote host.

See Remote Hosts for details.

Containers

Wing Pro also supports containerized development using Docker and other container systems. This mode of development stores and works with files on the local disk but starts debug, unit tests, and other processes in the container environment.

To work with Docker, use the New Project dialog from the Project to set up a project for an existing Docker container, or create of a new project together with a new Docker container.

For other containers, set Python Executable in Project Properties to Container and create a container configuration. See Containers for details.

OS Commands

The OS Commands tool can be used to set up, execute, and interact with external commands, for building, deployment, and other tasks. The Build Command field in the Debug/Execute tab of Project Properties can be used to configure and select one command to execute automatically before any debug session begins. OS Commands can also be bound to keys, and the Start Terminal item in the Tools menu uses it to start command prompt in Wing:

/images/doc/en/intro/oscommands.png

See OS Commands Tool for details.

Source Browser

The Source Browser in Wing Pro and Wing Personal can be used to inspect and navigate the module and class structure of your Python source code.

/images/doc/en/intro/source-browser.png

Double-clicking on items in the Source Browser opens them into an editor. When Follow Selection is enabled in the Options menu, Wing also opens files that are single-clicked or visited by keyboard navigation within the Source Browser.

The popup menu at the top left of the Source Browser selects whether to browse the current file, all project modules, or all project classes. The Options menu in the top right allows sorting and filtering symbols by type.

Notice that the Source Assistant tool is integrated with the Source Browser, and will update its content as you move around the Source Browser.

File Sets

Wing allows you to create named sets of files which you can open as a group or search in the Search in Files tool. See File Sets for details.

File Operations

Files can be created, deleted, moved, and renamed from the Project tool by right-clicking, dragging, and clicking on names in the tree. Deleted files are moved to the system's trash or recycling bin.

When files are in a revision control system, Wing will also issue the necessary revision control commands to create, delete, move, or rename the file in the repository.

See File Operations for details.

Perspectives

Perspectives are a way to store and later revisit particular arrangements of the user interface. For example, you may set up one set of visible tools to use when testing, another for working on documentation, and still another for debugging.

Perspectives are accessed from the Tools menu.

/images/doc/en/intro/perspectives.png

Wing can optionally switch perspectives automatically whenever debugging starts or stops, so that the user interface differs according to how the tools were left when last editing or debugging. This is done by selecting Enable Auto-Perspectives in the Tools menu.

See Perspectives for details.

Command Set and Key Bindings

Wing's complete command set is documented in the Command Reference. Any of these commands can be bound to a key binding with the User Interface > Keyboard > Custom Key Bindings preference. A key binding may be a single chord such as Shift-Ctrl-X or a sequence like Ctrl-; A.

To invoke a command directly even if it does not appear in a menu or toolbar item, use the Command by Name item in the Edit menu.

The default key bindings are documented in Key Binding Reference. You can check what command a key is bound to using the command describe-key-briefly, also invoked from Command by Name in the Edit menu.

Extending the IDE

Wing can be extended by writing Python scripts that call into the IDE's scripting API. This is useful for adding everything from simple editor commands and debugger add-ons to new tools.

Script-defined commands may be bound to keys, added to menus, or invoked from the toolbar just like Wing's built-in commands.

There is a collection of user-contributed scripts for Wing in the contributed materials area.

For details see Scripting and Extending Wing.