kernel.util

Module: kernel.util

General utilities for kernel related things.

Functions

IPython.kernel.util.catcher()
IPython.kernel.util.curry()

Curry the function f with curryArgs and curryKWargs.

IPython.kernel.util.printer()
IPython.kernel.util.tarModule()

Makes a tarball (as a string) of a locally imported module.

This method looks at the __file__ attribute of an imported module and makes a tarball of the top level of the module. It then reads the tarball into a binary string.

The method returns the tarball’s name and the binary string representing the tarball.

Notes:

  • It will handle both single module files, as well as packages.
  • The byte code files (*.pyc) are not deleted.
  • It has not been tested with modules containing extension code, but it should work in most cases.
  • There are cross platform issues.

Table Of Contents

Previous topic

kernel.twistedutil

Next topic

macro

This Page