Questions tagged [pylauncher]
4 questions
6
votes
1 answer
The Python Windows launcher isn't reading `py.ini`
I currently have Python 3.4 as my default Python version, but I want to set Python 2.7 as the default one temporarily.
I'm on Windows 7 and my Python scripts are run using the Python Windows launcher. The documentation says I can customize it by…

Ram Rachum
- 84,019
- 84
- 236
- 374
4
votes
2 answers
How to use shebang in windows for Python?
Code
#! C:\Python310\python.exe
import os
import sys
print(f"PY_PYTHON={os.getenv('PY_PYTHON')}")
print(f"{sys.version=}")
print(f"Shebang : '{open(__file__).read().splitlines()[0]}'")
cmd = 'py -0p'
print(cmd)
os.system(cmd)
cmd = f'file…

Smart Manoj
- 5,230
- 4
- 34
- 59
0
votes
0 answers
Where to store py-launcher configuration on UNIX systems?
While py (python-launcher) is supposed to be usable not only on Windows, I failed to find any documentation regarding where the py.ini file is supposed to stored on these systems of what configuration options are available to it.

sorin
- 161,544
- 178
- 535
- 806
0
votes
0 answers
Why do I have to replace all hyphens with underscores when calling modules with py launcher?
I'm using the Python launcher on Windows to simplify version management and avoid modifying system path.
I've successfully installed a few packages:
> py -m pip list
Package Version
------------------ ---------
Brotli …

gargoylebident
- 373
- 1
- 2
- 12