Python File as the Default PDF handler for Windows

Jean-Michel Pichavant jeanmichel at sequans.com
Tue Jun 23 10:26:28 EDT 2015


> Just to update, you are correct, Chris, the file short name is passed
> into sys.argv. didn't need to add anything to the path. But a gotcha
> -- Windows didn't like my .py, clicking on the pdf causes Windows to
> complain about 'file x' is not a valid windows executable. 

I'm not an expert of windows but you probably need to specify the python interpreter, not the script itself.

something like

C:\Python2.7\python.exe yourscript.py %*

in the windows file association panel.

JM


-- IMPORTANT NOTICE: 

The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


More information about the Python-list mailing list