-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Install source and version
- Installed from the Windows Store
- Installed with the MSIX from python.org
- Installed with the MSI from python.org
- Installed with
winget install 9NQ7512CXL7T
Version: 25.2
Description: Calling Python scripts from the command line (e.g. cmd) won't pass parameters to the script.
To Reproduce
testme.py:
import sys
print(sys.argv)
input()- Create
testme.py(see above) - open
cmd - type
testme.py testparam
A new console opens (why???) and shows ['...\\testme.py'], but not the parameter.
Expected output
The "classic" launcher and Python 3.13 on Windows behaved differently, neither was a new console window opened, nor were parameters missing.
Expected would be the following picture:
C:\Users\Myusername\Desktop>testme.py test
['C:\\Users\\Myusername\\Desktop\\testme.py', 'test']
C:\Users\Myusername\Desktop>
Expectation is:
- stay in the same console window (as all output from the script is lost otherwise, making all (my) scripts for administration and orchestration of stuff on command line useless)
- pass on all parameters to the script
Additional context
- using
py testme.py testshows the correct output, but (as described in the new launcher's docs and PEP 773) what are the file associations then good for, if most of my script's won't work that way, I wonder. - using
testme.py testas target of a Windows shortcut (.lnkfile) won't pass the parameter either, which is probably just plain wrong (e.g. when using a Shortcut to launch a.pywwith parameters, I cannot imagine it's wanted behaviour to remove all parameters)
Metadata
Metadata
Assignees
Labels
No labels