On this page
optparse.OptParseError
Prev: optparse.OptionValueError | Up: optparse | Next: optparse.TitledHelpFormatter
Rel: optparse.BadOptionError, optparse.check_choice, optparse.HelpFormatter, optparse.IndentedHelpFormatter
Ref: docs.python.org โ optparse.OptParseError
Tags: #public #python3 #stdlib #optparse
Import
import optparse
from optparse import OptParseError
Signature & Overview
optparse.OptParseError(msg)
optparse.OptParseError class.
Methods & Attributes
OptParseError.add_note(self, note, /)โ Add a note to the exceptionOptParseError.with_traceback(self, tb, /)โ Set self.traceback to tb and return self.
Usage
import optparse
assert issubclass(optparse.OptParseError, Exception)
Gotchas
- Base exception for all
optparseerrors.
REPL Inspect
from optparse import OptParseError
help(OptParseError)
Linked from
Related notes
- tuts/python3/stdlib_module/optparse/OptionValueError Linked here; links to this page; shared tags: #optparse, #stdlib
- tuts/python3/stdlib_module/optparse/TitledHelpFormatter Linked here; links to this page; shared tags: #optparse, #stdlib
- tuts/python3/stdlib_module/optparse Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/optparse/BadOptionError Linked here; shared tags: #optparse, #stdlib
- tuts/python3/stdlib_module/optparse/check_choice Linked here; shared tags: #optparse, #stdlib
- tuts/python3/stdlib_module/optparse/HelpFormatter Linked here; shared tags: #optparse, #stdlib
- tuts/python3/stdlib_module/optparse/IndentedHelpFormatter Linked here; shared tags: #optparse, #stdlib
- tuts/python3/stdlib_module/optparse/make_option shared tags: #optparse, #stdlib
- tuts/python3/stdlib_module/optparse/Option shared tags: #optparse, #stdlib
- tuts/python3/stdlib_module/optparse/OptionConflictError shared tags: #optparse, #stdlib