Steven W. Orr wrote: > I'm writing a program that needs to process options. Due to the nature > of the program with its large number of commandline options, I would > like to write a callback to be set inside add_option. > > Something like this: > > parser.add_option("-b", action="callback", callback=optionhandlr, dest='b')
What do you want your callback to do? Actually, a better question is, what do you want to happen when the user specifies "-b" at the command line? STeVe -- http://mail.python.org/mailman/listinfo/python-list