Py: Difference between revisions

From Omnia
Jump to navigation Jump to search
(Redirected page to Python)
 
(Removed redirect to Python)
Tag: Removed redirect
Line 1: Line 1:
#REDIRECT [[Python]]
== py - Python Windows Launcher ==
 
Windows Launcher
 
https://docs.python.org/3/using/windows.html#python-launcher-for-windows
 
== Python Launcher ==
 
General usage:
py
py -2
py -3
py -3.10
 
<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
-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)
 
...
</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>
 
== Python ==
 
See [[Python]]
 
== Windows Python ==
 
See [[Windows/Python]]
 
== keywords ==

Revision as of 16:15, 1 July 2024

py - Python Windows Launcher

Windows Launcher

https://docs.python.org/3/using/windows.html#python-launcher-for-windows

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

Python

See Python

Windows Python

See Windows/Python

keywords