Class k.d.DesktopParser(ConfigParser):

Part of kiwi.desktopparser View In Hierarchy

A DesktopParser for GNOME/KDE .desktop files. The API is similar to GKeyFile from glib.

Example:
>>> parser = DesktopParser()
>>> parser.read('/usr/share/applications/gnome-terminal.desktop')
>>> parser.get_locale('Desktop Entry', 'Comment', 'pt')
Method __init__ Undocumented
Method optionxform Undocumented
Method set_list_separator Sets the character which is used to separate
Method set_locale
Method get_locale
Method get_string_list
Method set_string_list
Method get_integer_list
Method set_integer_list
Method get_boolean_list
Method set_boolean_list
Method set_string_list_locale
Method get_string_list_locale
def __init__(self, defaults=None):
Undocumented
def optionxform(self, optionstr):
Undocumented
def set_list_separator(self, separator):
Sets the character which is used to separate values in lists. Typically ';' or ',' are used as separators. The default list separator is ';'.
Parametersseparatorthe separator
def set_locale(self, section, option, locale, value):
Parameterssectionsection name
optionan option
localea locale
valuevalue to set
def get_locale(self, section, option, locale):
Parameterssectionsection name
optionan option
localea locale
def get_string_list(self, section, option):
Parameterssectionsection name
optionan option
def set_string_list(self, section, option, values):
Parameterssectionsection name
optionan option
valueslist of string values
def get_integer_list(self, section, option):
Parameterssectionsection name
optionan option
def set_integer_list(self, section, option, values):
Parameterssectionsection name
optionan option
valueslist of integer values
def get_boolean_list(self, section, option):
Parameterssectionsection name
optionan option
def set_boolean_list(self, section, option, values):
Parameterssectionsection name
optionan option
valueslist of boolean values
def set_string_list_locale(self, section, option, locale, values):
Parameterssectionsection name
optionan option
localea locale
valueslist of string values
def get_string_list_locale(self, section, option, locale):
Parameterssectionsection name
optionan option
localea locale
API Documentation for Kiwi, generated by pydoctor.