kernel.pbutil

Module: kernel.pbutil

Utilities for PB using modules.

Functions

IPython.kernel.pbutil.checkMessageSize()

Check string m to see if it violates banana.SIZE_LIMIT.

This should be used on the client side of things for push, scatter and push_serialized and on the other end for pull, gather and pull_serialized.

Parameters :
m : string

Message whose size will be checked.

info : string

String describing what object the message refers to.

Exceptions :
  • PBMessageSizeError: Raised in the message is > banana.SIZE_LIMIT
Returns:

The original message or a Failure wrapping a PBMessageSizeError

IPython.kernel.pbutil.packageFailure()

Clean and pickle a failure preappending the string FAILURE:

IPython.kernel.pbutil.unpackageFailure()

See if a returned value is a pickled Failure object.

To distinguish between general pickled objects and pickled Failures, the other side should prepend the string FAILURE: to any pickled Failure.

Table Of Contents

Previous topic

kernel.parallelfunction

Next topic

kernel.pendingdeferred

This Page