[Tutor] how to add arguments to a command line program

shawn bright nephish at gmail.com
Fri Sep 14 19:14:40 CEST 2007


lo there all,

i want to write a program that will be called from another program.
I need to pass it one variable.
i suppose i could also do this with a module, and create a new instance of
whatever i want to pass it to,
but all the same, how would i go about this. like if i had a program that i
wanted to pass a number into.

i am sure i do it with sys args, but don't know how.

like

python run_my_script.py somevar

does this make sense ?

The other way to do this is create a class i suppose that could be called.
Should probably do it that way, but still, i would like to know.

thanks.

shawn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070914/4d65eb69/attachment.htm 


More information about the Tutor mailing list