windows-python-question

Michael Ingram michael.ingram at echostar.com
Wed May 29 16:01:04 EDT 2002


Uwe Schmitt <uwe at rocksport.de> wrote in message news:<ad2oo9$d55fq$1 at hades.rz.uni-sb.de>...
> Hi,
> 
> I'd like to write a python-program which is startet under Win when
> a file with an apropriate extension ('.rnt' for example) is
> double-klicked. How does my python-program know which file was
> clicked so that my program can load it ???
> 
> Greetings, Uwe.

Try windows help -->assoc or windows help -->ftype. You can specify a
file association for the .rnt extention with "assoc" and "ftype"
commands.  Altenatively Explore->View->Options->File Types->New Type
(NT).

Then specify your python program in the command string. The clicked
.rnt file will be passed in the %1 parameter, which you can access
with sys.argv[1].

Posting via Google Groups...so maybe tomorrow...

HTH,
Mike



More information about the Python-list mailing list