En Mon, 28 Jul 2008 01:43:52 -0300, Henry Chang <[EMAIL PROTECTED]> escribió:

> try optparse  :)
> http://docs.python.org/lib/module-optparse.html

(optparse might be too much for a single argument)

> On Sun, Jul 27, 2008 at 9:13 PM, aditya shukla
> <[EMAIL PROTECTED]>wrote:
>
>> in other words i do not want to do hard code the name of the file in my
>> code every time i need to read it.
>>
>> I was reading about the sys module and i guess sys.argv would take the
>> input from the command line whenever i run the python script .

Exactly. Try this:

import sys
print sys.argv

with no arguments, one, and several, and see what happens.

-- 
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to