What's the magic to allow this? If the value is not specified I would like to use the default value of 1.
import optparse p=optparse.OptionParser() p.add_option("--debug") (opts, args) = p.parse_args(['--debug=22']); print opts (opts, args) = p.parse_args(['--debug']); print opts Many TIA! Mark -- Mark Harrison Pixar Animation Studios -- http://mail.python.org/mailman/listinfo/python-list