Eryk Sun added the comment:

subprocess.Popen calls WinAPI CreateProcess, which can execute PE/COFF 
executables and .BAT/.CMD batch scripts. It doesn't know anything about .LNK 
shell shortcuts. If CreateProcess fails, a Windows shell (e.g. CMD or 
PowerShell) tries ShellExecuteEx, which knows how to open a .LNK file. You can 
use shell=True for this in Python.

Directly supporting ShellExecuteEx would be a major enhancement. It would 
probably require a new keyword-only parameter, or at least a sentinel value for 
the existing `shell` parameter.

----------
nosy: +eryksun
versions:  -Python 2.7, Python 3.3, Python 3.4, Python 3.5

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30979>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to