Cli2gui Index / Cli2gui / Tojson / Optparse2json
Auto-generated documentation for cli2gui.tojson.optparse2json module.
Show source in optparse2json.py:40
Generate json for an action and set the widget - used by the application.
def actionToJson(action: optparse.Option, widget: ItemType) -> Item: ...
Show source in optparse2json.py:58
Catergorise each action and generate json.
def categorize(actions: list[optparse.Option]) -> Generator[Item, None, None]: ...
Show source in optparse2json.py:73
Convert argparse to a dict.
parser
optparse.OptionParser - optparse parser
ParserRep
- dictionary representing parser object
def convert(parser: optparse.OptionParser) -> ParserRep: ...
Show source in optparse2json.py:28
Get the actions as json for each item and group under the parser.
def extractGroups(parser: optparse.OptionParser) -> Group: ...
Show source in optparse2json.py:15
Get the actions as json for each item under a group.
def extractOptions(optionGroup: optparse.OptionGroup) -> Group: ...