Module util
[show private | hide private]
[frames | no frames]

Module util

util: miscellaneous co2 utilities
Function Summary
  dump_sat_data(sat_data, path, filename)
convert data to xml and write it to a file.
object read_sat_data(path, filename)
load an xml dumpfile (as created by dump_sat_data), and convert the data to a python object.
boolean remove_file(path, filename)
remove_file(path, filename): remove a file.
string or None trace(print_it)
return or print a traceback after an exception occurred.

Variable Summary
bool can_marshal

Function Details

dump_sat_data(sat_data, path, filename)

convert data to xml and write it to a file. used by the relay to serialize satellite data.
Parameters:
sat_data - object to be serialized
           (type=simple python object)
path - path of the dump file (directory containing the file, absolute path)
           (type=string)
filename - name of the dumpfile
           (type=string)

read_sat_data(path, filename)

load an xml dumpfile (as created by dump_sat_data), and convert the data to a python object.
Parameters:
path - path of the dump file (directory containing the file, absolute path)
           (type=string)
filename - name of the dumpfile
           (type=string)
Returns:

           (type=object)

remove_file(path, filename)

remove_file(path, filename): remove a file.
Parameters:
path - absolute path a directory conteining the file
           (type=string)
filename - name of the file do be removed
           (type=string)
Returns:
True on success, False on failure
           (type=boolean)

trace(print_it=False)

return or print a traceback after an exception occurred.
Parameters:
print_it - whether to print the trace to stdout or to return it
           (type=boolean)
Returns:
the trace if print_it is True, else None
           (type=string or None)

Variable Details

can_marshal

Type:
bool
Value:
True                                                                   

Generated by Epydoc 1.1 on Thu Oct 16 16:37:23 2003 http://epydoc.sf.net