Re: Python File as the Default PDF handler for Windows

2015-06-23 Thread Jean-Michel Pichavant
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

Re: Python File as the Default PDF handler for Windows

2015-06-23 Thread Chris Angelico
On Wed, Jun 24, 2015 at 12:26 AM, Jean-Michel Pichavant jeanmic...@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

Re: Python File as the Default PDF handler for Windows

2015-06-23 Thread Naftali
On Thursday, June 18, 2015 at 5:05:15 PM UTC-4, Naftali wrote: Long time lurker. I'm looking to register a python script as the default pdf reader for windows. I assume I can just register the .py in the section windows section for registering default handlers, but I'm wondering how to

Re: Python File as the Default PDF handler for Windows

2015-06-23 Thread Mark Lawrence
On 23/06/2015 21:12, Dennis Lee Bieber wrote: On Tue, 23 Jun 2015 16:26:28 +0200 (CEST), Jean-Michel Pichavant jeanmic...@sequans.com declaimed the following: 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

Re: Python File as the Default PDF handler for Windows

2015-06-18 Thread Chris Angelico
On Fri, Jun 19, 2015 at 11:39 AM, MRAB pyt...@mrabarnett.plus.com wrote: I don't think it should be %s, but %*. Thanks, it's been a while since I fiddled with Windows associations. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: Python File as the Default PDF handler for Windows

2015-06-18 Thread Naftali
On Thursday, June 18, 2015 at 5:05:15 PM UTC-4, Naftali wrote: Long time lurker. I'm looking to register a python script as the default pdf reader for windows. I assume I can just register the .py in the section windows section for registering default handlers, but I'm wondering how to

Re: Python File as the Default PDF handler for Windows

2015-06-18 Thread MRAB
On 2015-06-19 02:18, Chris Angelico wrote: On Fri, Jun 19, 2015 at 11:03 AM, Naftali nmichalow...@gmail.com wrote: I may be missing something in your reply, but I am *not* wondering how to associate python with the .pdf file extension. That I know how to do. What I want to know is how from

Re: Python File as the Default PDF handler for Windows

2015-06-18 Thread Chris Angelico
On Fri, Jun 19, 2015 at 11:03 AM, Naftali nmichalow...@gmail.com wrote: I may be missing something in your reply, but I am *not* wondering how to associate python with the .pdf file extension. That I know how to do. What I want to know is how from within the program that I've told windows to

Re: Python File as the Default PDF handler for Windows

2015-06-18 Thread Naftali
On Thursday, June 18, 2015 at 5:05:15 PM UTC-4, Naftali wrote: Long time lurker. I'm looking to register a python script as the default pdf reader for windows. I assume I can just register the .py in the section windows section for registering default handlers, but I'm wondering how to

Python File as the Default PDF handler for Windows

2015-06-18 Thread Naftali
Long time lurker. I'm looking to register a python script as the default pdf reader for windows. I assume I can just register the .py in the section windows section for registering default handlers, but I'm wondering how to access the file from within the program. The issue is this: We

Re: Python File as the Default PDF handler for Windows

2015-06-18 Thread Chris Angelico
On Fri, Jun 19, 2015 at 7:04 AM, Naftali nmichalow...@gmail.com wrote: What I want to do is write a pdf handler to handle windows open instruction. In the script I would run a command line pdf unlocker on the file and open the unlocked file with adobe (or the like). I've googled and though