Python File as the Default PDF handler for Windows

Chris Angelico rosuav at gmail.com
Tue Jun 23 11:00:03 EDT 2015


On Wed, Jun 24, 2015 at 12:26 AM, Jean-Michel Pichavant
<jeanmichel at sequans.com> wrote:
>> 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.

Yep, that's what I'd recommend too. You shouldn't need to py2exe it.

ChrisA



More information about the Python-list mailing list