fred.dixon wrote:
how would i use the following if OPTIONS was in a module ?
-----------------------
from optparse import OptionParser

usage = "usage: %prog [options] arg"
parser = OptionParser(usage)

parser.add_option("-d", "--debug", ction="store_true", dest="verbose")
(OPTIONS = parser.parse_args()

Just have this code update the options module:

import options
...
opts, args = parser.parse_args()
options.__dict__.update(opts.__dict__)

STeVe
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to