Good day,
I've experienced a few issues with a few Python applications not calling their dependencies correctly in Windows 7. These applications will call their Python dependencies directly instead of as an argument to python.exe. As opposed to changing each file in the dependency chain to call the python command first, is there any way to make a direct call to a Python file and pass the parameters correctly, or is this an incorrect call to Python?
Note: I have python.exe set as the default program for .py files
C:\Users\***>ftype | findstr -i python
Python.CompiledFile="C:\Python27\python.exe" "%1" %*
Python.File="C:\Python27\python.exe" "%1" %*
Python.NoConFile="C:\Python27\pythonw.exe" "%1" %*
C:\Users\***>assoc | findstr -i python
.py=Python.File
.pyc=Python.CompiledFile
.pyo=Python.CompiledFile
.pyw=Python.NoConFile
I've written a Basic Argument-Parsing Python Script that will parse a command line argument and print it back as a greeting. If the argument isn't present, one will be asked to enter it as a raw input. The results of explicitly calling Python first and not doing so are printed below:
C:\Users\***\Desktop>python input.py --greeting="john"
john
The greeting is: john
C:\Users\***\Desktop>input.py --greeting="john"
None
Give me the greeting. johnrom
The greeting is: johnrom