Package rats :: Module statesaving
[hide private]
[frames] | no frames]

Module statesaving

source code

State saving tools

Two json modules exist. We must use the simplejson that became the standard json module in Python 2.6

Classes [hide private]
  StateSavingError
Any error the Saver class can generate.
Functions [hide private]
 
save(file_name, data)
State saving using JSON
source code
 
load(file_name) source code
Variables [hide private]
  __package__ = 'rats'

Imports: _tmp, warnings, sys, json


Function Details [hide private]

save(file_name, data)

source code 

State saving using JSON

The data attribute is a dict of basic types. (``str``, ``unicode``, ``int``, ``long``, ``float``, ``bool``, ``None``) It can contain dicts and lists as well.