process command line parameter

A

asit

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=".co.uk"

How can i do this ???
 
T

Thorsten Kampe

* 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=".co.uk"

How can i do this ???

Use optparse
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,017
Latest member
GreenAcreCBDGummiesReview

Latest Threads

Top