run a .py script with cmd line args

r rt8396 at
Tue Aug 12 21:20:34 CEST 2008

i have a python text editor program(script) that i would like to run
when a user clicks on .txt files.
how do i run my script from windows,
and send the filename to my script, so that my script can do:

if len(sys.argv) > 1:
         self.LoadFile(sys.argv[1])  # load text into editor

More information about the Python-list mailing list