This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Bernát Gábor
Recipients Bernát Gábor, paul.moore, steve.dower, tim.golden, zach.ware
Date 2017-07-20.22:32:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1500589924.87.0.691040995571.issue30979@psf.upfronthosting.co.za>
In-reply-to
Content
Although python27.exe.lnk is callable from any command line tool, with any of its arguments the subprocess module thinks it's not a valid Win32 application.

Proof, let there be python27.exe.lnk be a shortcut to python.exe:

C:\Python27
λ ls python*
python.exe*  python27.exe.lnk*  pythonw.exe*

λ python.exe -c "import sys; print(sys.version)"
2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)]

C:\Python27
λ python.exe -c "import subprocess; print(subprocess.call(['./python.exe', '-c', '\"import sys; print(sys.version)\"']))"
0

C:\Python27
λ python27.exe -c "import subprocess; print(subprocess.call(['./python27.exe.lnk', '-c', '\"import sys; print(sys.version)\"']))"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Python27\lib\subprocess.py", line 168, in call
    return Popen(*popenargs, **kwargs).wait()
  File "C:\Python27\lib\subprocess.py", line 390, in __init__
    errread, errwrite)
  File "C:\Python27\lib\subprocess.py", line 640, in _execute_child
    startupinfo)
WindowsError: [Error 193] %1 is not a valid Win32 application
History
Date User Action Args
2017-07-20 22:32:04Bernát Gáborsetrecipients: + Bernát Gábor, paul.moore, tim.golden, zach.ware, steve.dower
2017-07-20 22:32:04Bernát Gáborsetmessageid: <1500589924.87.0.691040995571.issue30979@psf.upfronthosting.co.za>
2017-07-20 22:32:04Bernát Gáborlinkissue30979 messages
2017-07-20 22:32:04Bernát Gáborcreate