Re: run a .py script with cmd line args

2008-08-12 Thread Gabriel Genellina
En Tue, 12 Aug 2008 16:34:13 -0300, Mike Driscoll <[EMAIL PROTECTED]> escribió: On Aug 12, 2:20 pm, r <[EMAIL PROTECTED]> wrote: 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

Re: run a .py script with cmd line args

2008-08-12 Thread Mike Driscoll
On Aug 12, 2:20 pm, r <[EMAIL PROTECTED]> wrote: > 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: >     try: >  

run a .py script with cmd line args

2008-08-12 Thread r
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: try: self.LoadFile(sys.argv[1]) # load text into editor