Windows/py: Difference between revisions

From Omnia
Jump to navigation Jump to search
(Created page with "Python Launcher <pre> Python Launcher for Windows Version 3.10.6150.1013 usage: py [launcher-args] [python-args] [script [script-args]] Launcher arguments: -2 : Launch the latest Python 2.x version -3 : Launch the latest Python 3.x version -X.Y : Launch the specified Python version The above all default to 64 bit if a matching 64 bit python is present. -X.Y-32: Launch the specified 32bit Python version -X-32 : Launch the latest 32bit Python X version...")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Python Launcher
== Python Launcher ==
 
General usage:
py
py -2
py -3
py -3.10


<pre>
<pre>
Line 31: Line 37:


...
...
</pre>
== Shebang ==
Shebang <ref>https://docs.python.org/3.8/using/windows.html</ref>
/usr/bin/env python
/usr/bin/python
/usr/local/bin/python
python
<pre>
#! /usr/bin/python -v
</pre>
</pre>

Latest revision as of 18:55, 19 June 2024

Python Launcher

General usage:

py
py -2
py -3
py -3.10
Python Launcher for Windows Version 3.10.6150.1013

usage:
py [launcher-args] [python-args] [script [script-args]]

Launcher arguments:

-2     : Launch the latest Python 2.x version
-3     : Launch the latest Python 3.x version
-X.Y   : Launch the specified Python version
     The above all default to 64 bit if a matching 64 bit python is present.
-X.Y-32: Launch the specified 32bit Python version
-X-32  : Launch the latest 32bit Python X version
-X.Y-64: Launch the specified 64bit Python version
-X-64  : Launch the latest 64bit Python X version
-0  --list       : List the available pythons
-0p --list-paths : List with paths

 If no script is specified the specified interpreter is opened.
If an exact version is not given, using the latest version can be overridden by
any of the following, (in priority order):
 An active virtual environment
 A shebang line in the script (if present)
 With -2 or -3 flag a matching PY_PYTHON2 or PY_PYTHON3 Environment variable
 A PY_PYTHON Environment variable
 From [defaults] in py.ini in your %LOCALAPPDATA%\py.ini
 From [defaults] in py.ini beside py.exe (use `where py` to locate)

...

Shebang

Shebang [1]

/usr/bin/env python
/usr/bin/python
/usr/local/bin/python
python
#! /usr/bin/python -v