process command line parameter

Thorsten Kampe thorsten at
Sun Jan 18 17:18:15 CET 2009

* asit (Sat, 17 Jan 2009 13:28:12 -0800 (PST))
> Recently I was coding a link extractor. It's a command line stuff and
> takes parameter as argument.
> I found that the in operator is not always helpful.
> eg. if "--all" in sys.argv:
>            print "all links will be printed"
> its not helpful when some attribute value is sent in command line
> parameter.
> hence I want to process some data like find=""
> How can i do this ???

Use optparse

More information about the Python-list mailing list