mau package

Subpackages

Submodules

mau.main module

mau.text_buffer module

exception mau.text_buffer.EOFError[source]

Bases: ValueError

Signals that the buffer is reading after the end of the text.

exception mau.text_buffer.EOLError[source]

Bases: ValueError

Signals that the buffer is reading after the end of a line.

class mau.text_buffer.TextBuffer(text=None)[source]

Bases: object

context(line_number, column_number)[source]
property current_char

Returns the current character.

This property returns the current character without advancing the index. If the buffer is reading after the last character of the line it raises EOLError.

property current_line

Returns the current line.

This property returns the current line without advancing the index. If the buffer is reading after the last line it raises EOFError.

goto(line, column=0)[source]
insert(text)[source]

Inserts the given text in the buffer.

load(text)[source]
nextline()[source]

Moves the index to the beginning of the next line

property peek_char

Returns the next character.

This property returns the next character without advancing the index. If the buffer is reading after the last character of the line it raises EOLError.

property position

Returns a tuple with the current position.

reset()[source]
skip(chars=1)[source]

Skips the given number of characters (default 1). Can silently go over the end of the line.

property tail

Returns the remaining part of the line.

This property returns a string with the last part of the current line from the current character to the end.

Module contents

exception mau.ConfigurationError[source]

Bases: ValueError

Used to signal an error in the configuration

class mau.Mau(config, target_format, default_templates=None, custom_templates=None, templates_directory=None, full_document=False)[source]

Bases: object

process(text)[source]