IPython Documentation

Table Of Contents

Previous topic

Module: utils.pickleshare

Next topic

Module: utils.process

This Page

Module: utils.pickleutil

Pickle related utilities. Perhaps this should be called ‘can’.

6 Classes

class IPython.utils.pickleutil.CannedObject(obj, keys=, []hook=None)

Bases: object

__init__(obj, keys=, []hook=None)

can an object for safe pickling

Parameters:

obj:

The object to be canned

keys: list (optional)

list of attribute names that will be explicitly canned / uncanned

hook: callable (optional)

An optional extra callable, which can do additional processing of the uncanned object.

large data may be offloaded into the buffers list,

used for zero-copy transfers.

class IPython.utils.pickleutil.Reference(name)

Bases: IPython.utils.pickleutil.CannedObject

object for wrapping a remote reference by name.

__init__(name)
class IPython.utils.pickleutil.CannedFunction(f)

Bases: IPython.utils.pickleutil.CannedObject

__init__(f)
class IPython.utils.pickleutil.CannedClass(cls)

Bases: IPython.utils.pickleutil.CannedObject

__init__(cls)
class IPython.utils.pickleutil.CannedArray(obj)

Bases: IPython.utils.pickleutil.CannedObject

__init__(obj)
class IPython.utils.pickleutil.CannedBytes(obj)

Bases: IPython.utils.pickleutil.CannedObject

__init__(obj)
wrap

alias of str

11 Functions

IPython.utils.pickleutil.use_dill()

use dill to expand serialization support

adds support for object methods and closures to serialization.

IPython.utils.pickleutil.CannedBuffer(CannedBytes)
IPython.utils.pickleutil.istype(obj, check)

like isinstance(obj, check), but strict

This won’t catch subclasses.

IPython.utils.pickleutil.can(obj)

prepare an object for pickling

IPython.utils.pickleutil.can_class(obj)
IPython.utils.pickleutil.can_dict(obj)

can the values of a dict

IPython.utils.pickleutil.can_sequence(obj)

can the elements of a sequence

IPython.utils.pickleutil.uncan(obj, g=None)

invert canning

IPython.utils.pickleutil.uncan_dict(obj, g=None)
IPython.utils.pickleutil.uncan_sequence(obj, g=None)
IPython.utils.pickleutil.can_dependent(obj)