KeyFile#

class KeyFile(**kwargs)#
Constructors:

new() -> GLib.KeyFile

Constructors#

class KeyFile
classmethod new() KeyFile#

Methods#

class KeyFile
error_quark() int#
get_boolean(group_name: str, key: str) bool#
Parameters:
  • group_name

  • key

get_boolean_list(group_name: str, key: str) list[bool]#
Parameters:
  • group_name

  • key

get_comment(group_name: str | None = None, key: str | None = None) str#
Parameters:
  • group_name

  • key

get_double(group_name: str, key: str) float#
Parameters:
  • group_name

  • key

get_double_list(group_name: str, key: str) list[float]#
Parameters:
  • group_name

  • key

get_groups() tuple[list[str], int]#
get_int64(group_name: str, key: str) int#
Parameters:
  • group_name

  • key

get_integer(group_name: str, key: str) int#
Parameters:
  • group_name

  • key

get_integer_list(group_name: str, key: str) list[int]#
Parameters:
  • group_name

  • key

get_keys(group_name: str) tuple[list[str], int]#
Parameters:

group_name

get_locale_for_key(group_name: str, key: str, locale: str | None = None) str | None#
Parameters:
  • group_name

  • key

  • locale

get_locale_string(group_name: str, key: str, locale: str | None = None) str#
Parameters:
  • group_name

  • key

  • locale

get_locale_string_list(group_name: str, key: str, locale: str | None = None) list[str]#
Parameters:
  • group_name

  • key

  • locale

get_start_group() str | None#
get_string(group_name: str, key: str) str#
Parameters:
  • group_name

  • key

get_string_list(group_name: str, key: str) list[str]#
Parameters:
  • group_name

  • key

get_uint64(group_name: str, key: str) int#
Parameters:
  • group_name

  • key

get_value(group_name: str, key: str) str#
Parameters:
  • group_name

  • key

has_group(group_name: str) bool#
Parameters:

group_name

load_from_bytes(bytes: Bytes, flags: KeyFileFlags) bool#
Parameters:
  • bytes

  • flags

load_from_data(data: str, length: int, flags: KeyFileFlags) bool#
Parameters:
  • data

  • length

  • flags

load_from_data_dirs(file: str, flags: KeyFileFlags) tuple[bool, str]#
Parameters:
  • file

  • flags

load_from_dirs(file: str, search_dirs: Sequence[str], flags: KeyFileFlags) tuple[bool, str]#
Parameters:
  • file

  • search_dirs

  • flags

load_from_file(file: str, flags: KeyFileFlags) bool#
Parameters:
  • file

  • flags

remove_comment(group_name: str | None = None, key: str | None = None) bool#
Parameters:
  • group_name

  • key

remove_group(group_name: str) bool#
Parameters:

group_name

remove_key(group_name: str, key: str) bool#
Parameters:
  • group_name

  • key

save_to_file(filename: str) bool#
Parameters:

filename

set_boolean(group_name: str, key: str, value: bool) None#
Parameters:
  • group_name

  • key

  • value

set_boolean_list(group_name: str, key: str, list: Sequence[bool]) None#
Parameters:
  • group_name

  • key

  • list

set_comment(group_name: str | None, key: str | None, comment: str) bool#
Parameters:
  • group_name

  • key

  • comment

set_double(group_name: str, key: str, value: float) None#
Parameters:
  • group_name

  • key

  • value

set_double_list(group_name: str, key: str, list: Sequence[float]) None#
Parameters:
  • group_name

  • key

  • list

set_int64(group_name: str, key: str, value: int) None#
Parameters:
  • group_name

  • key

  • value

set_integer(group_name: str, key: str, value: int) None#
Parameters:
  • group_name

  • key

  • value

set_integer_list(group_name: str, key: str, list: Sequence[int]) None#
Parameters:
  • group_name

  • key

  • list

set_list_separator(separator: int) None#
Parameters:

separator

set_locale_string(group_name: str, key: str, locale: str, string: str) None#
Parameters:
  • group_name

  • key

  • locale

  • string

set_locale_string_list(group_name: str, key: str, locale: str, list: Sequence[str]) None#
Parameters:
  • group_name

  • key

  • locale

  • list

set_string(group_name: str, key: str, string: str) None#
Parameters:
  • group_name

  • key

  • string

set_string_list(group_name: str, key: str, list: Sequence[str]) None#
Parameters:
  • group_name

  • key

  • list

set_uint64(group_name: str, key: str, value: int) None#
Parameters:
  • group_name

  • key

  • value

set_value(group_name: str, key: str, value: str) None#
Parameters:
  • group_name

  • key

  • value

to_data() tuple[str, int]#