pickle (version 1.56)
index
/usr/lib/python2.2/pickle.py

Create portable serialized representations of Python objects.
 
See module cPickle for a (much) faster implementation.
See module copy_reg for a mechanism for registering custom picklers.
 
Classes:
 
    Pickler
    Unpickler
 
Functions:
 
    dump(object, file)
    dumps(object) -> string
    load(file) -> object
    loads(string) -> object
 
Misc variables:
 
    __version__
    format_version
    compatible_formats

 
Modules
            
marshal
re
struct
sys
 
Classes
            
exceptions.Exception
PickleError
PicklingError
UnpicklingError
_Stop
Pickler
Unpickler
_EmptyClass
 
class PickleError(exceptions.Exception)
       
   Data and non-method functions defined here:
__doc__ = None
__module__ = 'pickle'

Methods inherited from exceptions.Exception:
__getitem__(...)
__init__(...)
__str__(...)
 
class Pickler
       
   Methods defined here:
__init__(self, file, bin=0)
dump(self, object)
get(self, i)
inst_persistent_id(self, object)
persistent_id(self, object)
put(self, i)
save(self, object, pers_save=0)
save_dict(self, object)
save_empty_tuple(self, object)
save_float(self, object, pack=<built-in function pack>)
save_global(self, object, name=None)
save_inst(self, object)
save_int(self, object)
save_list(self, object)
save_long(self, object)
save_none(self, object)
save_pers(self, pid)
save_reduce(self, callable, arg_tup, state=None)
save_string(self, object)
save_tuple(self, object)
save_unicode(self, object)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'pickle'
dispatch = {<type 'NoneType'>: <function save_none>, <type 'str'>: <function save_string>, <type 'tuple'>: <function save_tuple>, <type 'type'>: <function save_global>, <type 'unicode'>: <function save_unicode>, <type 'class'>: <function save_global>, <type 'instance'>: <function save_inst>, <type 'float'>: <function save_float>, <type 'function'>: <function save_global>, <type 'int'>: <function save_int>, ...}
 
class PicklingError(PickleError)
       
  
Method resolution order:
PicklingError
PickleError
exceptions.Exception

Data and non-method functions defined here:
__doc__ = None
__module__ = 'pickle'

Methods inherited from exceptions.Exception:
__getitem__(...)
__init__(...)
__str__(...)
 
class Unpickler
       
   Methods defined here:
__init__(self, file)
_is_string_secure(self, s)
Return true if s contains a string that is safe to eval
 
The definition of secure string is based on the implementation
in cPickle.  s is secure as long as it only contains a quoted
string and optional trailing whitespace.
find_class(self, module, name)
load(self)
load_append(self)
load_appends(self)
load_binfloat(self, unpack=<built-in function unpack>)
load_binget(self)
load_binint(self)
load_binint1(self)
load_binint2(self)
load_binpersid(self)
load_binput(self)
load_binstring(self)
load_binunicode(self)
load_build(self)
load_dict(self)
load_dup(self)
load_empty_dictionary(self)
load_empty_list(self)
load_empty_tuple(self)
load_eof(self)
load_float(self)
load_get(self)
load_global(self)
load_inst(self)
load_int(self)
load_list(self)
load_long(self)
load_long_binget(self)
load_long_binput(self)
load_mark(self)
load_none(self)
load_obj(self)
load_persid(self)
load_pop(self)
load_pop_mark(self)
load_put(self)
load_reduce(self)
load_setitem(self)
load_setitems(self)
load_short_binstring(self)
load_stop(self)
load_string(self)
load_tuple(self)
load_unicode(self)
marker(self)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'pickle'
dispatch = {'': <function load_eof>, '(': <function load_mark>, ')': <function load_empty_tuple>, '.': <function load_stop>, '0': <function load_pop>, '1': <function load_pop_mark>, '2': <function load_dup>, 'F': <function load_float>, 'G': <function load_binfloat>, 'I': <function load_int>, ...}
 
class UnpicklingError(PickleError)
       
  
Method resolution order:
UnpicklingError
PickleError
exceptions.Exception

Data and non-method functions defined here:
__doc__ = None
__module__ = 'pickle'

Methods inherited from exceptions.Exception:
__getitem__(...)
__init__(...)
__str__(...)
 
class _EmptyClass
       
   Data and non-method functions defined here:
__doc__ = None
__module__ = 'pickle'
 
class _Stop(exceptions.Exception)
       
   Methods defined here:
__init__(self, value)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'pickle'

Methods inherited from exceptions.Exception:
__getitem__(...)
__str__(...)
 
Functions
            
StringIO(...)
StringIO([s]) -- Return a StringIO-like stream for reading or writing
_keep_alive(x, memo)
Keeps a reference to the object x in the memo.
 
Because we remember objects by their id, we have
to assure that possibly temporary objects are kept
alive by referencing them.
We store a reference at the id of the memo, which should
normally not be used unless someone tries to deepcopy
the memo itself...
dump(object, file, bin=0)
dumps(object, bin=0)
load(file)
loads(str)
mdumps = dumps(...)
mloads = loads(...)
whichmodule(cls, clsname)
Figure out the module in which a class occurs.
 
Search sys.modules for the module.
Cache in classmap.
Return a module name.
If the class cannot be found, return __main__.
 
Data
             APPEND = 'a'
APPENDS = 'e'
BINFLOAT = 'G'
BINGET = 'h'
BININT = 'J'
BININT1 = 'K'
BININT2 = 'M'
BINPERSID = 'Q'
BINPUT = 'q'
BINSTRING = 'T'
BINUNICODE = 'X'
BUILD = 'b'
DICT = 'd'
DUP = '2'
EMPTY_DICT = '}'
EMPTY_LIST = ']'
EMPTY_TUPLE = ')'
FLOAT = 'F'
GET = 'g'
GLOBAL = 'c'
INST = 'i'
INT = 'I'
LIST = 'l'
LONG = 'L'
LONG_BINGET = 'j'
LONG_BINPUT = 'r'
MARK = '('
NONE = 'N'
OBJ = 'o'
PERSID = 'P'
POP = '0'
POP_MARK = '1'
PUT = 'p'
PyStringMap = None
REDUCE = 'R'
SETITEM = 's'
SETITEMS = 'u'
SHORT_BINSTRING = 'U'
STOP = '.'
STRING = 'S'
StringTypes = (<type 'str'>, <type 'unicode'>)
TUPLE = 't'
UNICODE = 'V'
__all__ = ['PickleError', 'PicklingError', 'UnpicklingError', 'Pickler', 'Unpickler', 'dump', 'dumps', 'load', 'loads', 'APPEND', 'APPENDS', 'BINFLOAT', 'BINGET', 'BININT', 'BININT1', 'BININT2', 'BINPERSID', 'BINPUT', 'BINSTRING', 'BINUNICODE', ...]
__file__ = '/usr/lib/python2.2/pickle.pyc'
__name__ = 'pickle'
__version__ = '$Revision: 1.56 $'
classmap = {}
compatible_formats = ['1.0', '1.1', '1.2']
dispatch_table = {<type '_sre.SRE_Pattern'>: <function _pickle>, <type 'complex'>: <function pickle_complex>, <type 'parser.st'>: <built-in function _pickler>}
format_version = '1.3'
safe_constructors = {<built-in function sequence2st>: 1, <function _compile>: 1, <type 'complex'>: 1}
x = 'sys'