Command Line Usage

Index of All Documentation » Wing Pro Reference Manual » Introduction »


You can run Wing from the command line as follows:

On Windows, the executable is called wing.exe and is located in the bin directory in your Wing installation. This is not on the PATH by default, but may be added with the Windows Control Panel. In Wing Personal the executable is instead named wing-personal.exe and in Wing 101 it is named wing-101.exe.

On Linux, when installing from Debian or RPM packages, the executable is named wing7.1 and when installing with Snap it is named wing7. In both these cases, the executable is available on the PATH. When installing with the Tar installer, and in all other cases as well, the executable is available as wing in the installation directory, which is not on the PATH by default. In Wing Personal the executable is instead named wing-personal7.1 (or wing-personal7 with Snap) and in Wing 101 it is named wing-101-7.1 (or wing-101-7 with Snap).

On OS X, the executable is called wing and is located in Contents/Resources within the .app bundle directory. This is not on the PATH by default, but could be added either by adding that directory to PATH in ~/.profile (for example, PATH="/Applications/WingPro.app/Contents/Resources:${PATH}"; export PATH) or by placing a symbolic link (for example, by typing sudo ln -s /Applications/WingPro.app/Contents/Resources/wing wing7.1 in a directory that is already on the PATH). In Wing Personal the executable is instead named wing-personal and in Wing 101 it is named wing-101.

Opening Files and Projects

Once you have established a way to start Wing from the command line, you may specify a list of files to open after the executable name. These can be arbitrary text files and a project file. For example, the following will open project file myproject.wpr and also the three source files mysource.py, README, and Makefile:

wing.exe mysource.py README Makefile myproject.wpr

Wing determines file type by extension, so position of the project file name (if any) on the command line is not important.

A line number may be specified for the first file on the command line by appending :<line-number> to the file name. For example, README:100 will position the cursor at the start of line 100 of the README file.

Command Line Options

The following options may be specified anywhere on the command line:

--prefs-file -- Add the file name following this argument to the list of preferences files that are opened by the IDE. These files are opened after the system-wide and default user preferences files, so values in them override those given in other preferences files.

--new -- By default Wing will reuse an existing running instance of Wing to open files specified on the command line. This option turns off this behavior and forces creation of a new instance of Wing. Note that a new instance is always created if no files are given on the command line.

--reuse -- Force Wing to reuse an existing running instance of Wing IDE even if there are no file names given on the command line. This just brings Wing to the front.

--settings=fullpath -- Use the given fullpath instead of the default location for the Settings Directory.

--cache=fullpath -- Use the given fullpath instead of the default location for the cache directory.

--verbose -- (Posix only) This option causes Wing to print verbose error reporting output to stderr. On Windows, run console_wing.exe instead for the same result.

--disable-updates -- Load Wing without applying any updates made since the last installation from an installer package. If you are having problems with an update, the update can be reverted from the About box.

--check-install -- Check the installation and all updates to make sure that files have not changed or been removed since they were installed. Combine this with --disable-updates to check only the original installation that was made from an installer package.

--use-winghome -- (For developers only) This option sets WINGHOME to be used during this run. It is used internally and by developers contributing to Wing. The directory to use follows this argument.

--use-src -- (For developers only) This option is used to force Wing to run from Python source files even if compiled files are present in the bin directory, as is the case after a distribution has been built.

--orig-python-path -- (For developers only) This option is used internally to indicate the original Python path in use by the user before Wing was launched. The path follows this argument.

--squelch-output -- (For developers only) This option prevents any output of any kind to stdout and stderr. Used on Windows to avoid console creation.