<br>See <a href="http://docs.python.org/lib/module-optparse.html">optparse</a> or <a href="http://effbot.org/librarybook/sys.htm">sys.argv.</a><br><br><br><br><div><span class="gmail_quote">On 9/14/07, <b class="gmail_sendername">
shawn bright</b> &lt;<a href="mailto:nephish@gmail.com">nephish@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
lo there all, <br><br>i want to write a program that will be called from another program. <br>I need to pass it one variable.<br>i suppose i could also do this with a module, and create a new instance of whatever i want to pass it to,
<br>but all the same, how would i go about this. like if i had a program that i wanted to pass a number into.<br><br>i am sure i do it with sys args, but don&#39;t know how.<br><br>like <br><br>python run_my_script.py somevar 
<br><br>does this make sense ?<br><br>The other way to do this is create a class i suppose that could be called.<br>Should probably do it that way, but still, i would like to know.<br><br>thanks.<br><span class="sg"><br>
shawn<br>
</span><br>_______________________________________________<br>Tutor maillist &nbsp;- &nbsp;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Tutor@python.org">Tutor@python.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">
http://mail.python.org/mailman/listinfo/tutor</a><br><br></blockquote></div><br>