Loading associated files
kyosohma at gmail.com
Thu Apr 24 19:41:05 CEST 2008
On Apr 24, 10:14 am, flarefi... at googlemail.com wrote:
> I am trying to make a a simple databasing GUI interface and and have
> created a module to deal with parsing the data from a file and a GUI
> based program that displays this data using PyQt4, i know how to
> register files in the system registry using python and also using Inno
> Setup which i use to package my applications, but i cant work out how
> if a file is doubled clicked on to send the path of that file to
> I have looked into passing command line arguments to python and can
> send a specific pathname to python but ideally what i need is a
> generic command that i can write to the registry that passes the
> pathname of whichever file was doubled clicked!?!
> am i asking too much/does it exist/is there an easier way to do this!!
I did this by writing the path to me script or exe and added %1 to the
end, which basically means that my program can (or requires) a
parameter passed to it. Here's an example:
"C:\Program Files\PyMail\wxsendmail.exe" %1
That should work. Tested on Windows XP SP2 with Python 2.4/2.5.
More information about the Python-list