[Tutor] passing in string from command line
Thu, 6 Dec 2001 17:46:07 -0000
Another Basic enough question I hope you can help with!
I'm reading in values from the command line that I want to assign to
variables within the code, i.e
>>python file.py number word
I know how to pass the typed number into a variable, i.e,
print "Sorry, but you did not enter a number"
What's the equivalent to "variable1 =int(sys.argv)" for assigning the
entered word to a variable, something like this??????........
Thanks in advance.
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.