Table Of Contents
Parser¶
Class used for the parsing of .kv files into rules.
- class kivy.lang.parser.Parser(**kwargs)¶
Bases:
builtins.objectCreate a Parser object to parse a Kivy language file or Kivy content.
- parse(content)¶
Parse the contents of a Parser file and return a list of root objects.
- parse_level(level, lines, spaces=0)¶
Parse the current level (level * spaces) indentation.
- strip_comments(lines)¶
Remove all comments from all lines in-place. Comments need to be on a single line and not at the end of a line. i.e. a comment line’s first non-whitespace character must be a #.
- exception kivy.lang.parser.ParserException(context, line, message, cause=None)¶
Bases:
ExceptionException raised when something wrong happened in a kv file.