pickle (version 1.37)
index
/usr/lib/python1.6/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
string
struct
sys

 
Classes
            
C
Pickler
Unpickler
_EmptyClass

 
class C
       
  
__cmp__(self, other)

 
class Pickler
       
  
__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)

 
class Unpickler
       
  
__init__(self, file)
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)

 
class _EmptyClass
       
  

 
Functions
            
_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(...)
test()
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'
BufferType = <type 'buffer'>
BuiltinFunctionType = <type 'builtin_function_or_method'>
BuiltinMethodType = <type 'builtin_function_or_method'>
ClassType = <type 'class'>
CodeType = <type 'code'>
ComplexType = <type 'complex'>
DICT = 'd'
DUP = '2'
DictType = <type 'dictionary'>
DictionaryType = <type 'dictionary'>
EMPTY_DICT = '}'
EMPTY_LIST = ']'
EMPTY_TUPLE = ')'
EllipsisType = <type 'ellipsis'>
FLOAT = 'F'
FileType = <type 'file'>
FloatType = <type 'float'>
FrameType = <type 'frame'>
FunctionType = <type 'function'>
GET = 'g'
GLOBAL = 'c'
INST = 'i'
INT = 'I'
InstanceType = <type 'instance'>
IntType = <type 'int'>
LIST = 'l'
LONG = 'L'
LONG_BINGET = 'j'
LONG_BINPUT = 'r'
LambdaType = <type 'function'>
ListType = <type 'list'>
LongType = <type 'long int'>
MARK = '('
MethodType = <type 'instance method'>
ModuleType = <type 'module'>
NONE = 'N'
NoneType = <type 'None'>
OBJ = 'o'
PERSID = 'P'
POP = '0'
POP_MARK = '1'
PUT = 'p'
PicklingError = 'pickle.PicklingError'
PyStringMap = None
REDUCE = 'R'
SETITEM = 's'
SETITEMS = 'u'
SHORT_BINSTRING = 'U'
STOP = '.'
STRING = 'S'
SliceType = <type 'slice'>
StringType = <type 'string'>
TUPLE = 't'
TracebackType = <type 'traceback'>
TupleType = <type 'tuple'>
TypeType = <type 'type'>
UNICODE = 'V'
UnboundMethodType = <type 'instance method'>
UnicodeType = <type 'unicode'>
UnpicklingError = 'pickle.UnpicklingError'
XRangeType = <type 'xrange'>
__file__ = '/usr/lib/python1.6/pickle.pyc'
__name__ = 'pickle'
__version__ = '$Revision: 1.37 $'
classmap = {}
compatible_formats = ['1.0', '1.1', '1.2']
dispatch_table = {<type 'complex'>: <function pickle_complex at 81ba9a8>, <type 'SRE_Pattern'>: <function _pickle at 81b8ba0>}
format_version = '1.3'
safe_constructors = {<built-in function complex>: 1, <function _compile at 81dc6b8>: 1}