python -- figured out how to parse command line args

Delaney, Timothy C (Timothy) tdelaney at avaya.com
Thu Jun 24 02:10:33 EDT 2004


David Stockwell wrote:

> I figured out how to do it in its simplest form...
> 
> import sys
> 
> 
> for arg in sys.argv:
>     print "arg: ", arg
> 
> 
> I think I saw that in the tutorial, i'd forgotten how though.

The next step is to look at the 'optparse' module.

Tim Delaney




More information about the Python-list mailing list