optparse global

ashtonn@gmail.com doodle4 at gmail.com
Mon May 16 13:32:41 EDT 2005


Hello,

How do i make an option passed through command line, using optparse
global. I need to import this value in another file.

This is what iam trying to do.

$python test.py -d ffffffffffff

i should be able to store 'ffffffffffff' as global so that i could
access this value in another file. If 'ffffffffffff' is not given, then
a default value stored in
parser.add_options("-d", default="01ff010BFFFF", action="store")
will be returned.

Thanks,
-Ashton




More information about the Python-list mailing list