Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

This is a simple launcher for Python files, which is functionally equivalent to
the launchers in setuptools but not based on setuptools code. There are two
versions of the launcher - console and GUI - built from the same source code.

The launcher has been written as part of the pythonv branch, and is intended
to facilitate location of the correct Python executable for a script in an
environment where there may be multiple versions of Python deployed.

The launcher is intended to facilitate script execution under Windows where a
PEP 397-compatible launcher is not available. The idea is that each Python
script has a copy of the launcher (symlinks not being generally available
under Windows). For scripts to work with the launcher, they have to have a name
ending in (for a console script) or -script.pyw (for a GUI script).
The deployment system (e.g. packaging) will ensure that for, a
console launcher opy named foo.exe is placed in the same directory; for
bar-script.pyw, a GUI launcher copy named bar.exe is placed in the same

Assuming that the relevant directories are on the path, the scripts can be
invoked using just "foo" or "bar". The foo.exe or bar.exe executable then
runs: it looks for a script with the appropriate suffix ("" or
"-script.pyw") in the same directory, and if found, opens that script to read a
shebang line indicating which Python executable to use for the script. That
executable, if found, is launched with the script and other arguments passed:

foo a b c -> c:\path\to\python.exe c:\other\path\to\ a b c
bar d e f -> c:\path\to\pythonw.exe c:\other\path\to\bar-script.pyw d e f

Note: More recently, the launchers have been updated to find their script in an
archive appended to the executable, rather than a separate file. (This variant
is enabled when APPENDED_ARCHIVE is #defined). This allows the launchers to be
used to e.g. run .pyz archives as native Windows executables.

Recent activity

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.