kiwi.desktopparser.DesktopParser(ConfigParser) class documentationkiwi.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 values in lists. Typically ';' or ',' are used as separators. The default list separator is ';'. |
| 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. |
Sets the character which is used to separate values in lists. Typically ';' or ',' are used as separators. The default list separator is ';'.
| Parameters | separator | the separator |
Set locale.
| Parameters | section | section name |
| option | an option | |
| locale | a locale | |
| value | value to set |
Get locale.
| Parameters | section | section name |
| option | an option | |
| locale | a locale |
Get a list as string.
| Parameters | section | section name |
| option | an option |
Set a list of string values.
| Parameters | section | section name |
| option | an option | |
| values | list of string values |
Get a list of integers as string.
| Parameters | section | section name |
| option | an option |
Set a list with integer values.
| Parameters | section | section name |
| option | an option | |
| values | list of integer values |
Get a boolean list.
| Parameters | section | section name |
| option | an option |
Set an list wiht boolena values.
| Parameters | section | section name |
| option | an option | |
| values | list of boolean values |