k.d.DesktopParser(ConfigParser) : class documentation

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 Set locale.
Method get_locale Get locale.
Method get_string_list Get a list as string.
Method set_string_list Set a list of string values.
Method get_integer_list Get a list of integers as string.
Method set_integer_list Set a list with integer values.
Method get_boolean_list Get a boolean list.
Method set_boolean_list Set an list wiht boolena values.
Method set_string_list_locale Set string list with locale values.
Method get_string_list_locale Get list locale as an string.
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):
Set locale.
Parameterssectionsection name
optionan option
localea locale
valuevalue to set
def get_locale(self, section, option, locale):
Get locale.
Parameterssectionsection name
optionan option
localea locale
def get_string_list(self, section, option):
Get a list as string.
Parameterssectionsection name
optionan option
def set_string_list(self, section, option, values):
Set a list of string values.
Parameterssectionsection name
optionan option
valueslist of string values
def get_integer_list(self, section, option):
Get a list of integers as string.
Parameterssectionsection name
optionan option
def set_integer_list(self, section, option, values):
Set a list with integer values.
Parameterssectionsection name
optionan option
valueslist of integer values
def get_boolean_list(self, section, option):
Get a boolean list.
Parameterssectionsection name
optionan option
def set_boolean_list(self, section, option, values):
Set an list wiht boolena values.
Parameterssectionsection name
optionan option
valueslist of boolean values
def set_string_list_locale(self, section, option, locale, values):
Set string list with locale values.
Parameterssectionsection name
optionan option
localea locale
valueslist of string values
def get_string_list_locale(self, section, option, locale):
Get list locale as an string.
Parameterssectionsection name
optionan option
localea locale
API Documentation for Kiwi, generated by pydoctor at 2010-05-20 02:10:57.