I'd like to be able to be able to define options and then look at the lists. (For a concrete idea of a use case, suppose that it did not directly support the --help option and I wanted to write code that took its place.) Unfortunately, there doesn't seem to be any public API for doing this.
Even if I were to do something like options = [ make_option(...), make_option(...) ] (using optparse) and could thus get a handle on the Option objects, there doesn't seem to be a public API for retrieving stuff like the actual options (though available via opt._short_opts and opt._long_opts). This means that either I need to write my own wrappers around options, option groups, and perhaps even an option parser, or I have to dig into _variables _that _are _not _part _of _the _public _api. Both of those choices are distasteful. So, 1) Did I miss anything? 2) Is there some particular reason that this API *isn't* provided, and if I asked for it I might get it in a future version? Evan
signature.asc
Description: OpenPGP digital signature
-- http://mail.python.org/mailman/listinfo/python-list