diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-10-11 00:49:57 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-10-11 00:49:57 (GMT) |
commit | f10a79aad4e2fc62d2c3675e89f873b22b185e7b (patch) | |
tree | 06b042ca03a71663d26ad95949807d1bd2472bf4 /Lib/optparse.py | |
parent | 2d8dcdcb06005858e87eded012ceff10920445b7 (diff) | |
download | cpython-f10a79aad4e2fc62d2c3675e89f873b22b185e7b.zip cpython-f10a79aad4e2fc62d2c3675e89f873b22b185e7b.tar.gz cpython-f10a79aad4e2fc62d2c3675e89f873b22b185e7b.tar.bz2 |
merge from trunk
Diffstat (limited to 'Lib/optparse.py')
-rw-r--r-- | Lib/optparse.py | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/Lib/optparse.py b/Lib/optparse.py index ab2ce40..3792e76 100644 --- a/Lib/optparse.py +++ b/Lib/optparse.py @@ -1,21 +1,13 @@ -"""optparse - a powerful, extensible, and easy-to-use option parser. +"""A powerful, extensible, and easy-to-use option parser. By Greg Ward <gward@python.net> -Originally distributed as Optik; see http://optik.sourceforge.net/ . - -If you have problems with this module, please do not file bugs, -patches, or feature requests with Python; instead, use Optik's -SourceForge project page: - http://sourceforge.net/projects/optik +Originally distributed as Optik. For support, use the optik-users@lists.sourceforge.net mailing list (http://lists.sourceforge.net/lists/listinfo/optik-users). """ -# Python developers: please do not make changes to this file, since -# it is automatically generated from the Optik source code. - __version__ = "1.5.3" __all__ = ['Option', @@ -1263,9 +1255,19 @@ class OptionParser (OptionContainer): self.usage = usage def enable_interspersed_args(self): + """Set parsing to not stop on the first non-option, allowing + interspersing switches with command arguments. This is the + default behavior. See also disable_interspersed_args() and the + class documentation description of the attribute + allow_interspersed_args.""" self.allow_interspersed_args = True def disable_interspersed_args(self): + """Set parsing to stop on the first non-option. Use this if + you have a command processor which runs another command that + has options of its own and you want to make sure these options + don't get confused. + """ self.allow_interspersed_args = False def set_process_default_values(self, process): |