[Tutor] sys.argv?

Rikard Bosnjakovic rikard.bosnjakovic at gmail.com
Tue Apr 17 14:41:28 CEST 2007


On 4/17/07, python at uni-code.com <python at uni-code.com> wrote:

> I've been reading the python tutorial trying to get used to the style
> tryna understand it.  So I come across this: "sys.argv[0]" in the tutorial
> on python.org.  What is "sys.argv"?  How does it work? Can someone give me
> a simple example on how to use it?

sys.argv is a list containing all the arguments sent to the program at
invokation. The name "argv" is derived from the C-world; argument
values.


-- 
- Rikard - http://bos.hack.org/cv/


More information about the Tutor mailing list