Wing Tips: Navigating Python Code with Wing Pro 7 (part 3 of 3)

Nov 28, 2019


Last week and the week before, we looked at some of the code navigation features in Wing, including goto-definition, find uses, and project-wide search, code index menus, and the Source Browser.

This week we'll finish up this mini-series by looking at how to quickly and easily find and open files or visit symbols in Python code by typing a name fragment.

Project Configuration

The features described here assume that you have used Add Existing Directory in the Project menu to add your source code to your project. Typically the project should contain the code you are actively working on. Packages that your code uses can be left out of the project, unless you anticipate often wanting to open or search files in them. Wing will still be able to find them through the Python Path, as needed for auto-completion, code warnings, and other purposes.

Open From Project

Open from Project from the File menu is typically the easiest way to navigate to a file by name. This displays a dialog that lists the project files whose names match a fragment:

/images/blog/code-navigation/open-from-project.png

Fragments can be abbreviations of the file name and may match enclosing directory names if they contain / or \. The arrow keys navigate the list and pressing Enter opens the selected file.

Find Symbol

A similar interface is available to find Python code symbols by name. For the current file, this is Find Symbol in the Source menu. For all project files, use Find Symbol in Project instead:

/images/blog/code-navigation/find-symbol-in-project.png

That's it for now! We'll be back soon with more Wing Tips for Wing Python IDE.

As always, please don't hesitate to email support@wingware.com if you run into problems or have any questions.



Share this article: