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 I get tons of 'how to open pdf from a python script' > I haven't found anything describing how to write and set up my python program > to deal with the pdf hand-off from the OS. >
Possibly the reason you've found nothing is that this isn't actually a Python issue :) What you want to do is tell your OS that when you double-click on a PDF, it should run this program. That's better referred to as "file associations". Different versions of Windows put that in different places, but poke around in your GUI or on the internet and you should be able to find something on updating associations. If you're having trouble getting a Python program to run in that situation, it may help to explicitly name a Python interpreter - an executable binary. ChrisA -- https://mail.python.org/mailman/listinfo/python-list