Wing Pro Reference Manual This manual documents the entire feature set of Wing Pro, which is a Python IDE designed for professional . It covers installation, customization, setting up a project, editing, searching, refactoring, comparing files and directories, navigating source code, using the integrated Python shell, executing commands, , , , code analysis, and extending the IDE with user-defined scripts. Trouble-shooting information is also included, for installation and usage problems, as well as a complete reference for Wing Pro's preferences, command set, and available key bindings. If you are looking for a gentler introduction to Wing's feature set, try the Tutorial in Wing's Help menu. A more concise overview of Wing's features is also available in the Quick Start Guide. Our How-Tos collection explains how to use Wing with specific Python frameworks for web and GUI development, 2D and 3D modeling, rendering, and compositing applications, , Raspberry Pi, and other Python-based libraries.

Wingware, the feather logo, Wing Python IDE, Wing Pro, Wing Personal, Wing 101, Wing IDE, Wing IDE 101, Wing IDE Personal, Wing IDE Professional, Wing IDE Pro, Wing Debugger, and "The Intelligent Development Environment for Python Programmers" are trademarks or registered trademarks of Wingware in the United States and other countries. Disclaimers: The information contained in this document is subject to change without notice. Wingware shall not be liable for technical or editorial errors or omissions contained in this document; nor for incidental or consequential damages resulting from furnishing, performance, or use of this material. Hardware and software products mentioned herein are named for identification purposes only and may be trademarks of their respective owners.

Copyright () 1999-2017 by Wingware. All rights reserved.

Wingware P.O. Box 400527 Cambridge, MA 02140-0006 United States of America Contents

Wing Pro Reference Manual 1 Introduction 1 1.1. Product Levels 1 1.2. Licenses 1 1.3. Supported Platforms 1 Windows 1 OS X 1 1 Remote Development 2 1.4. Supported Python versions 2 1.5. Technical Support 2 1.6. Prerequisites for Installation 2 1.7. Installing Wing 2 1.8. Running Wing 3 1.9. Installing your License 3 1.10. User Settings Directory 5 1.11. Upgrading 6 1.11.1. Migrating From Older Versions 6 Licensing 6 Compatibility Changes in Wing 6 6 1.11.2. Fixing a Failed Upgrade 7 1.12. Installation Details and Options 7 1.12.1. Linux Installation Notes 7 1.12.2. Remote Display on Linux 8 1.12.3. Installing Extra Documentation 9 1.12.4. Source Code Installation 9 1.13. Backing Up and Sharing Settings 9 1.14. Removing Wing 10 1.15. Command Line Usage 10 Opening Files and Projects 10 Command Line Options 11 Customization 11 2.1. Keyboard Personalities 12 2.1.1. Key Equivalents 12 2.1.2. Key Maps 13 2.1.3. Key Names 14 2.2. User Interface Options 15 2.2.1. Display Style and Colors 15 Editor Color Configuration 15 UI Color Configuration 15 Add Color Palettes 15 2.2.2. Windowing Policies 15 2.2.3. User Interface Layout 16 2.2.4. Altering Text Display 17 2.3. Preferences 17 2.3.1. Preferences File Layers 17 2.3.2. Preferences File Format 18 2.4. Custom Syntax Coloring 18 Minor Adjustments 18 Comprehensive Changes 18 Overriding Preferences 18 Color Palette-Specific Configuration 19 Print-Only Colors 19 Automatic Color Adjustment 19 Color Names for Python 19 2.5. Perspectives 20 2.6. File Filters 21 Project Manager 22 3.1. Creating a Project 22 3.2. Removing Files and Directories 22 3.3. Saving the Project 22 3.4. Sorting the View 23 3.5. Navigating to Files 23 3.5.1. Keyboard Navigation 23 3.6. Sharing Projects 23 3.7. Project-wide Properties 25 Environment 25 Debug 25 Options 26 Extensions 26 Testing 27 3.7.1. Environment Variable Expansion 27 3.8. Per-file Properties 27 File Attributes 28 Editor 28 Debug/Execute 28 Testing 28 3.9. Launch Configurations 29 Shared Launch Configurations 30 Working on Different Machines or OSes 30 3.10. Remote Hosts 30 How it Works 30 Setting up SSH 31 Accessing SSH From Wing 32 Connecting without SSH User Agent 32 Configuring Remote Hosts 32 Project Configuration 34 Working with Remote Hosts 35 3.10.1. SSH Setup Details 36 Linux, OS X, and Windows with Cygwin or Bash 36 Windows with Putty 37 Source Code Editor 38 4.1. Syntax Coloring 38 4.2. Right-click Editor Menu 38 4.3. Navigating Source 38 4.4. File status and read-only files 39 4.5. Transient, Sticky, and Locked Editors 39 4.6. Auto-completion 39 4.7. Source Assistant 41 4.7.1. Docstring Type and Validity 41 4.7.2. Python Documentation Links 42 4.7.3. Working with Runtime Type Information 42 4.7.4. Source Assistant Options 42 4.8. Auto-editing 42 4.9. Multiple Selections 44 4.10. Bookmarks 44 4.11. File Sets 45 Binding File Sets to Keys 45 Shared File Sets 45 4.12. Code Snippets 46 User Interface 46 Contexts 46 Key Bindings 46 Execution and Data Entry 47 Auto-completion 47 Snippet Syntax 47 Indentation and Line Endings 48 Cursor Placement 48 Snippet Directory Layout 48 File Types 48 Contexts 49 Configuration 49 Commands 49 Scripting Snippets 49 4.13. Indentation 49 4.13.1. How Indent Style is Determined 49 4.13.2. Indentation Preferences 49 4.13.3. Indentation Policy 50 4.13.4. Auto-Indent 50 4.13.5. The Tab Key 51 4.13.6. Checking Indentation 52 4.13.7. Changing Block Indentation 52 4.13.8. Indentation Manager 52 4.14. Folding 52 4.15. Brace Matching 53 4.16. Support for files in .zip or .egg files 53 4.17. Keyboard Macros 54 4.18. Notes on Copy/Paste 54 Smart Copy 54 4.19. Auto-reloading Changed Files 54 4.20. Auto-save 55 Search/Replace 55 5.1. Toolbar Quick Search 55 5.2. Keyboard-driven Mini-Search/Replace 55 5.3. Search Tool 56 5.4. Search in Files Tool 57 5.4.1. Replace in Multiple Files 57 5.5. Find Points of Use 57 5.6. Wildcard Search Syntax 58 Refactoring 58 6.1. Rename Symbol 58 6.2. Move Symbol 59 6.3. Extract Function / Method 59 6.4. Introduce Variable 59 6.5. Symbol to * 59 Diff/Merge Tool 60 Diff/Merge Options 60 Source Code Browser 60 8.1. Display Choices 61 8.2. Display Filters 61 8.3. Sorting the Browser Display 62 8.4. Navigating the Views 62 8.5. Browser Keyboard Navigation 62 Interactive Python Shell 63 9.1. Active Ranges in the Python Shell 63 9.2. Python Shell Auto-completion 63 9.3. Debugging Code in the Python Shell 64 9.4. Python Shell Options 65 OS Commands Tool 65 10.1. OS Command Properties 66 Unit Testing 67 11.1. Project Test Files 67 11.2. Running Tests 68 Options 68 11.3. Running unittest Tests From the Command Line 69 Debugger 69 12.1. Quick Start 70 12.2. Specifying Main Entry Point 71 12.2.1. Named Entry Points 71 12.3. Debug Properties 71 12.4. Setting Breakpoints 71 Breakpoint Types 71 Breakpoint Attributes 72 Breakpoints Tool 72 Keyboard Modifiers for Breakpoint Margin 72 12.5. Starting Debug 72 12.6. Debugger Status 73 12.7. Flow Control 74 12.8. Viewing the Stack 74 12.9. Viewing Debug Data 75 12.9.1. Stack Data View 75 12.9.1.1. Popup Menu Options 76 12.9.1.2. Filtering Value Display 76 12.9.2. Watching Values 76 12.9.3. Evaluating Expressions 77 12.9.4. Problems Handling Values 78 12.10. Debug Process I/O 78 12.10.1. External I/O Consoles 79 12.10.2. Disabling Debug Process I/O Multiplexing 79 12.11. Interactive Debug Probe 80 12.11.1. Managing Program State 80 12.11.2. Debugging Code Recursively 80 12.11.3. Debug Probe Options 80 12.12. Multi-Process Debugging 81 12.13. Debugging Multi-threaded Code 83 12.14. Managing Exceptions 84 Exception Reporting Mode 84 Reporting Logged Exceptions 85 Exception Type Filters 85 12.15. Running Without Debug 85 Advanced Debugging Topics 85 13.1. Debugging Externally Launched Code 85 13.1.1. Debugging Externally Launched Remote Code 86 Changing Remote Debug Port 87 Debugging on Multiple Remote Hosts 87 Diagnosing Problems 87 13.1.2. Externally Launched Process Behavior 87 Behavior on Failure to Attach to IDE 87 Enabling Process Termination 87 13.1.3. Debugging Embedded Python Code 87 13.1.4. Debug Server Configuration 88 13.1.5. Debugger API 89 13.2. Manually Configured Remote Debugging 89 13.2.1. Manually Configuring SSH Tunneling 91 13.2.2. Manually Configured File Location Maps 92 13.2.2.1. Manually Configured File Location Map Examples 92 13.2.3. Manually Configured Remote Debugging Example 94 13.2.4. Manually Installing the Debugger Core 95 13.3. Using wingdb to Initiate Debug 95 13.4. Attaching and Detaching 97 13.4.1. Access Control 97 13.4.2. Detaching 97 13.4.3. Attaching 97 13.4.4. Identifying Foreign Processes 97 13.4.5. Constraints 98 13.5. OS X Debugging Notes 98 13.6. Debugger Limitations 98 Integrated Version Control 100 14.1. Setting Up Version Control in Wing 101 14.2. Version Control Tool Panel 101 14.3. Common Version Control Operations 101 14.4. Bazaar 102 14.5. CVS 103 14.6. Git 103 14.7. 103 14.8. 104 14.9. Subversion 104 14.10. Version Control Configuration 105 14.10.1. Configuring SSH 105 14.10.2. Configuring Subversion 106 14.10.3. Configuring CVS 106 Source Code Analysis 107 15.1. How Analysis Works 107 15.2. Static Analysis Limitations 107 15.3. Helping Wing Analyze Code 108 Using Live Runtime State 108 Using PEP484 and PEP 526 to Assist Analysis 108 Using isinstance() to Assist Analysis 109 Using *.pi or *.pyi Files to Assist Analysis 109 Naming and Placing *.pyi Files 109 Merging *.pyi Name Spaces 110 Creating Variants by Python Version 110 15.4. Analysis Disk Cache 110 Integration 110 Scripting and Extending Wing 111 17.1. Scripting Example 112 Enabling Auto-Completion in Extension Scripts 112 17.2. Getting Started 113 Naming Commands 113 Reloading Scripts 113 Overriding Internal Commands 113 17.3. Script Syntax 113 Script Attributes 114 ArgInfo 114 Commonly Used Types 114 Commonly Used Formlets 115 Magic Default Argument Values 116 GUI Contexts 116 Top-level Attributes 116 Importing Other Modules 117 Internationalization and Localization 117 Plugins 117 17.4. Scripting API 118 17.5. Debugging Extension Scripts 118 17.6. Advanced Scripting 119 Working with Wing's Source Code 119 How Script Reloading Works 119 Trouble-shooting Guide 120 18.1. Trouble-shooting Failure to Start 120 18.2. Speeding up Wing 121 18.3. Trouble-shooting Failure to Debug 121 18.3.1. Failure to Start Debug 121 18.3.2. Failure to Stop on Breakpoints or Show Source Code 122 18.3.3. Failure to Stop on Exceptions 123 18.3.4. Extra Debugger Exceptions 123 18.4. Trouble-shooting Other Known Problems 124 18.5. Obtaining Diagnostic Output 124 Preferences Reference 126 User Interface 126 Projects 132 Files 133 Editor 136 Debugger 150 Source Analysis 160 Version Control 162 IDE Extension Scripting 166 Network 166 Internal Preferences 167 Core Preferences 167 User Interface Preferences 169 Editor Preferences 171 Project Manager Preferences 173 Debugger Preferences 173 Source Analysis Preferences 176 Command Reference 176 20.1. Top-level Commands 177 Application Control Commands 177 Dock Window Commands 187 Document Viewer Commands 188 Global Documentation Commands 189 Window Commands 189 Wing Tips Commands 189 Subversion Commands 190 Git Commands 190 Bazaar Commands 191 C V S Commands 192 Mercurial Commands 193 Perforce Commands 194 20.2. Project Manager Commands 195 Project Manager Commands 195 Project View Commands 197 Subversion Commands 197 Git Commands 198 Bazaar Commands 199 C V S Commands 200 Mercurial Commands 201 Perforce Commands 202 20.3. Editor Commands 203 Editor Browse Mode Commands 203 Editor Insert Mode Commands 203