Thanks for your reply, I have used some of your ideas in my Code.
--
http://mail.python.org/mailman/listinfo/python-list
Thanks for your reply, I have used some of your ideas in my Code.
--
http://mail.python.org/mailman/listinfo/python-list
Hue,
It looks like you may have options and arguments confused. Arguments
are the pieces of information that your program needs to run. Options
are used to tune the behaviour of your program.
For example:
grep -i foo bar
Tries to match the expression "foo" in the file "bar", ignoring the
case of t
hue wrote:
try:
opts,args = getopt.getopt(sys.argv[1:], 'n:t:h:i:o:',
^^^
This may be the problem. As I recall, a colon following an option
indicates that it is followed by an argument as in "-f filename".
For options that
Hue wrote:
> try:
>
> opts,args = getopt.getopt(sys.argv[1:], 'n:t:h:i:o:',
> ["Number=","time=","help=","image_file=","Output Filename="])
>
> except getopt.GetoptError:
> print 'Unrecognized argument or option'
> usage()
> sys.exit(0)
Proceed with e.g.:
I am trying to parse command line options using getopt module.
I have written the following Code
import string
import getopt
def usage():
print '''haarp_make.py -- uses getopt to recognize options
Options: -n -- No
-t -- Time
-h -- help
-i