Would you be willing to add a mode to optparse that would "pass through" any command line options that the user did not register with add_option()?
I have a scripting toolchain that looks like this:
regression test script: options for platform, etc.
Install script: options for tarfile,
install directory, etc.
configure script: autoconf script with
The indentation indicates a call level. Each level needs to strip options particular to itself, and then pass the remaining options to a lower level.
It seems natural to add a mode to the optparse internal state that controls whether optparse:
* (current behavior) dies when an unregistered
option is encountered
* (desired behavior) passes unregistered options
through as unparsed arguments
Would this be something you would be willing to add to Python 3.0?
Log in to post a comment.