Home | Trees | Index | Help |
|
---|
Package sage :: Package misc :: Module db |
|
Function Summary | |
---|---|
load(filename): Loads an object from filename and returns it. | |
Load x from the database. | |
path()
| |
save(x, filename): Saves x to a file. | |
Save x to the database. |
Variable Summary | |
---|---|
str |
PATH = '/home/was/sage/db'
|
bool |
USE_DB = False
|
Function Details |
---|
load(filename, bzip2=False, gzip=False)load(filename): Loads an object from filename and returns it. INPUT: filename -- a string that defines a valid file. If the file doesn't exist then an IOError exception is raised. OUTPUT: An almost arbitrary object. |
load_db(x)Load x from the database. x must define a filename method. |
save(x, filename, bzip2=False, gzip=False)save(x, filename): Saves x to a file. Pretty much the only constraint on x is that it have no circular references (it must be Python pickle-able). This uses the pickle module, so data you save is *guaranteed* to be readable by future versions of Python. INPUT: x -- almost arbitrary object filename -- a string OUTPUT: Creates a file named filename, from which the object x can be reconstructed. |
save_db(x)Save x to the database. x must define a filename method. |
Variable Details |
---|
PATH
|
USE_DB
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Mon Jun 20 15:43:22 2005 | http://epydoc.sf.net |