Skip to content

Latest commit

 

History

History
111 lines (61 loc) · 2.13 KB

optparse2json.md

File metadata and controls

111 lines (61 loc) · 2.13 KB

Optparse2json

Cli2gui Index / Cli2gui / Tojson / Optparse2json

Auto-generated documentation for cli2gui.tojson.optparse2json module.

actionToJson

Show source in optparse2json.py:40

Generate json for an action and set the widget - used by the application.

Signature

def actionToJson(action: optparse.Option, widget: ItemType) -> Item: ...

See also

categorize

Show source in optparse2json.py:58

Catergorise each action and generate json.

Signature

def categorize(actions: list[optparse.Option]) -> Generator[Item, None, None]: ...

See also

convert

Show source in optparse2json.py:73

Convert argparse to a dict.

Arguments


  • parser optparse.OptionParser - optparse parser

Returns


  • ParserRep - dictionary representing parser object

Signature

def convert(parser: optparse.OptionParser) -> ParserRep: ...

See also

extractGroups

Show source in optparse2json.py:28

Get the actions as json for each item and group under the parser.

Signature

def extractGroups(parser: optparse.OptionParser) -> Group: ...

See also

extractOptions

Show source in optparse2json.py:15

Get the actions as json for each item under a group.

Signature

def extractOptions(optionGroup: optparse.OptionGroup) -> Group: ...

See also