E
Evan Driscoll
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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJPDOU9AAoJEAOzoR8eZTzgQ9wH/0cvWkMcq/5qrgJBtPa4qdSJ
QKPbVh/8lkWoa9aGRUVYDnKfKHcAnoW5BzwgkDuivs8Z9ULz9jTW75RBOSsN08TD
21YtuJXbgKfUcs7E3an/z6uvE9vxqY/aXtmuUNpnhbjMyyPPvMyEL26NlT/Nh9ap
xf68m6aTlk5FgqKEg/4YlJe6suIlIpTQ38LInV6aqXL1cD3T5JmY4srW1wzSGzXm
fY/nn3m5j1KdMACm/Sq+BZ/sVwVy5e9+BmIqfvXWaxQuwnSg4QP57vTJz/caskh3
sMcdEZVXOZcUH4p+P7Sy7buOMQbFgaatnPO2kABg9yczIuk7vs/3MzsLX+8ngHs=
=v8Qo
-----END PGP SIGNATURE-----
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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJPDOU9AAoJEAOzoR8eZTzgQ9wH/0cvWkMcq/5qrgJBtPa4qdSJ
QKPbVh/8lkWoa9aGRUVYDnKfKHcAnoW5BzwgkDuivs8Z9ULz9jTW75RBOSsN08TD
21YtuJXbgKfUcs7E3an/z6uvE9vxqY/aXtmuUNpnhbjMyyPPvMyEL26NlT/Nh9ap
xf68m6aTlk5FgqKEg/4YlJe6suIlIpTQ38LInV6aqXL1cD3T5JmY4srW1wzSGzXm
fY/nn3m5j1KdMACm/Sq+BZ/sVwVy5e9+BmIqfvXWaxQuwnSg4QP57vTJz/caskh3
sMcdEZVXOZcUH4p+P7Sy7buOMQbFgaatnPO2kABg9yczIuk7vs/3MzsLX+8ngHs=
=v8Qo
-----END PGP SIGNATURE-----