Gnumed.timelinelib.db.backends.file

Package Gnumed :: Package timelinelib :: Package db :: Package backends :: Module file |
[frames] | no frames]

# Module file

source code

Classes
| ParseException Thrown if parsing of data read from file fails.
| FileTimeline The general format of the file looks like this for version >= 0.3.0:

Functions
parse_bool(bool_string) Return True or False. | source code
parse_color(color_string) Return a tuple (r, g, b) or raise exception. | source code
split_on_semicolon(text) The delimiter is ; but only if not proceeded by backslash. | source code
dequote(text) | source code
quote(text) | source code
identity(obj) | source code
encode_icon(data) Data is wx.Bitmap. | source code
decode_icon(string) Return is wx.Bitmap. | source code
get_encode_function(id) | source code
get_decode_function(id) | source code

Variables
| ENCODING = `"utf-8"`

Imports: datetime, abspath, base64, codecs, os, re, StringIO, wx, MemoryDB, TimelineIOError, Category, Event, TimePeriod, safe_write, get_version, ex_msg

Function Details

### parse_bool(bool_string) | source code
Return True or False. Expected format 'True' or 'False'.

### parse_color(color_string) | source code
Return a tuple (r, g, b) or raise exception. Expected format 'r,g,b'.

### split_on_semicolon(text) | source code
    The delimiter is ; but only if not proceeded by backslash.

    Examples:

        'foo;bar' -> ['foo', 'bar']
        'foo\;bar;barfoo -> ['foo\;bar', 'barfoo']