Class k.d.DesktopParser(ConfigParser):

Part of kiwi.desktopparser

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')
Function__init__Undocumented
FunctionoptionxformUndocumented
Functionset_list_separator
Sets the character which is used to separate
Functionset_locale
Set locale.
Functionget_locale
Get locale.
Functionget_string_list
Get a list as string.
Functionset_string_list
Set a list of string values.
Functionget_integer_list
Get a list of integers as string.
Functionset_integer_list
Set a list with integer values.
Functionget_boolean_list
Get a boolean list.
Functionset_boolean_list
Set an list wiht boolena values.
Functionset_string_list_locale
Set string list with locale values.
Functionget_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 ';'.
def set_locale(self, section, option, locale, value):
Set locale.
def get_locale(self, section, option, locale):
Get locale.
def get_string_list(self, section, option):
Get a list as string.
def set_string_list(self, section, option, values):
Set a list of string values.
def get_integer_list(self, section, option):
Get a list of integers as string.
def set_integer_list(self, section, option, values):
Set a list with integer values.
def get_boolean_list(self, section, option):
Get a boolean list.
def set_boolean_list(self, section, option, values):
Set an list wiht boolena values.
def set_string_list_locale(self, section, option, locale, values):
Set string list with locale values.
def get_string_list_locale(self, section, option, locale):
Get list locale as an string.