config

Config

class kivy.config.Config
classmethod getint()
Config.getint('kivy', 'show_fps')
# 0
classmethod set()
Config.set('graphics', 'resizable', '0')
Config.set('postproc', 'retain_time', '50')
classmethod write()
Config.set('graphics', 'resizable', '0')
Config.write()
  • kivy
    • default_font: list

    • desktop: int, 0 or 1

    • exit_on_escape: int, 0 or 1

    • pause_on_minimize: int, 0 or 1

    • keyboard_layout: string

    • keyboard_mode: string - включение режима экранной клавиатуры
      • ‘’ - Let Kivy choose the best option for your current platform.

      • ‘system’ - real keyboard.

      • ‘dock’ - one virtual keyboard docked to a screen side.

      • ‘multi’ - one virtual keyboard for every widget request.

      • ‘systemanddock’ - virtual docked keyboard plus input from real keyboard.

      • ‘systemandmulti’ - analogous.

    • kivy_clock: one of default, interrupt, free_all, free_only

    • log_dir: string

    • log_enable: int, 0 or 1

    • log_level: string, one of ‘trace’, ‘debug’, ‘info’, ‘warning’, ‘error’ or ‘critical’

    • log_name: string

    • log_maxfiles: int

    • window_icon: string

  • postproc
    • double_tap_distance: float

    • double_tap_time: int

    • ignore: list of tuples
      • ignore = [(xmin, ymin, xmax, ymax), …]

    • jitter_distance: int

    • jitter_ignore_devices: string, separated with commas

    • retain_distance: int

    • retain_time: int

    • triple_tap_distance: float

    • triple_tap_time: int

  • graphics
    • borderless: int , one of 0 or 1

    • window_state: string , one of ‘visible’, ‘hidden’, ‘maximized’ or ‘minimized’

    • fbo: string, one of ‘hardware’, ‘software’ or ‘force-hardware’

    • fullscreen: int or string, one of 0, 1, ‘fake’ or ‘auto’

    • height: int

      высота окна

      Config.set('graphics', 'height', 600)
      
    • left: int

    • maxfps: int, defaults to 60

    • multisamples: int, defaults to 2

    • position: string, one of ‘auto’ or ‘custom’

    • show_cursor: int, one of 0 or 1

    • top: int

    • resizable: :py:classL`int`, 0 или 1

      Возможность изменять размер окна приложения.

      Config.set('graphics', 'resizable', 0)
      Config.set('graphics', 'resizable', 1)
      
    • rotation: int, one of 0, 90, 180 or 270

    • width: int

      ширина окна

      Config.set('graphics', 'width', 800)
      
    • minimum_width: int

    • minimum_height: int

    • min_state_time: float, defaults to .035

    • allow_screensaver: int, one of 0 or 1, defaults to 1

  • input

  • widgets
    • scroll_distance: int

    • scroll_friction: float

    • scroll_timeout: int

    • scroll_stoptime: int

    • scroll_moves: int

  • modules

ConfigParser

class kivy.config.ConfigParser(**kwargs)
  • name

name
static get_configparser(name)
add_callback(callback, section=None, key=None)
ConfigParser(name='kivy').add_callback(
    lambda section, key, value: pass
)
adddefaultsection(section)
get(section, option, **kwargs)
getdefault(section, option, defaultvalue)
getdefaultint(section, option, defaultvalue)
remove_callback(callback, section=None, key=None)
set(section, option, value)
setall(section, keyvalues)
setdefault(section, option, value)
setdefaults(section, keyvalues)
updateconfig(filename, overwrite=None)
write()