OptionGroup

class OptionGroup(*args, **kwargs)

A GOptionGroup struct defines the options in a single group. The struct has only private fields and should not be directly accessed.

All options in a group share the same translation function. Libraries which need to parse commandline options are expected to provide a function for getting a GOptionGroup holding their options, which the application can then add to its OptionContext.

Methods

class OptionGroup
add_entries(entries: list[OptionEntry]) None

Adds the options specified in entries to group.

Added in version 2.6.

Parameters:

entries – a None-terminated array of OptionEntry

set_translation_domain(domain: str) None

A convenience function to use gettext() for translating user-visible strings.

Added in version 2.6.

Parameters:

domain – the domain to use