kernel.enginefc — IPython v0.10 documentation

### Navigation

- index
- modules |
- next |
- previous |
- IPython v0.10 documentation »
- The IPython API »

# kernel.enginefc

## Module: `kernel.enginefc`

Inheritance diagram for `IPython.kernel.enginefc`:

Expose the IPython EngineService using the Foolscap network protocol.

Foolscap is a high-performance and secure network protocol.

## Classes

### `EngineFromReference`

class `IPython.kernel.enginefc.` `EngineFromReference`(reference)

  Bases: `object`

  Adapt a RemoteReference to an IEngineBase implementing object.

  When an engine connects to a controller, it calls the register_engine method of the controller and passes the controller a RemoteReference to itself. This class is used to adapt this RemoteReference to an object that implements the full IEngineBase interface.

  See the documentation of IEngineBase for details on the methods.

  `__init__`(reference)
  `callRemote`(*args, **kwargs)
  `checkReturnForFailure`(r)

    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.

  `clear_properties`()
  `del_properties`(keys)
  `execute`(lines)
  `get_id`()
    Return the Engines id.
  `get_properties`(keys=None)
  `get_result`(i=None)
  `has_properties`(keys)
  `id`
    Return the Engines id.
  `keys`()
  `kill`()
  `killBack`(f)
  `properties`
  `pull`(keys)
  `pull_function`(keys)
  `pull_serialized`(keys)
  `push`(namespace)
  `push_function`(namespace)
  `push_serialized`(namespace)
    Older version of pushSerialize.
  `reset`()
  `set_id`(id)
    Set the Engines id.
  `set_properties`(properties)
  `syncProperties`(r)

### `FCEngineReferenceFromService`

class `IPython.kernel.enginefc.` `FCEngineReferenceFromService`(service)

  Bases: `foolscap.referenceable.Referenceable`, `object`

  Adapt an IEngineBase to an IFCEngine implementer.

  This exposes an IEngineBase to foolscap by adapting it to a foolscap.Referenceable.

  See the documentation of the IEngineBase methods for more details.

  `__init__`(service)
  `remote_clear_properties`()
  `remote_del_properties`(keys)
  `remote_execute`(lines)
  `remote_get_id`()
  `remote_get_properties`(keys=None)
  `remote_get_result`(i=None)
  `remote_has_properties`(keys)
  `remote_keys`()
  `remote_kill`()
  `remote_pull`(keys)
  `remote_pull_function`(keys)
  `remote_pull_serialized`(keys)
  `remote_push`(pNamespace)
  `remote_push_function`(pNamespace)
  `remote_push_serialized`(pNamespace)
  `remote_reset`()
  `remote_set_id`(id)
  `remote_set_properties`(pNamespace)

### `FCRemoteEngineRefFromService`

class `IPython.kernel.enginefc.` `FCRemoteEngineRefFromService`(service)

  Bases: `foolscap.referenceable.Referenceable`

  Adapt an IControllerBase to an IFCControllerBase.

  `__init__`(service)
  `remote_register_engine`(engine_reference, id=None, pid=None, pproperties=None)

### `IFCControllerBase`

class `IPython.kernel.enginefc.` `IFCControllerBase`(name, bases=(), attrs=None, __doc__=None, __module__=None)

  Bases: `zope.interface.Interface`

  Interface that tells how an Engine sees a Controller.

  In our architecture, the Controller listens for Engines to connect and register. This interface defines that registration method as it is exposed over the Foolscap network protocol

  static `__init__`(name, bases=(), attrs=None, __doc__=None, __module__=None)

### `IFCEngine`

class `IPython.kernel.enginefc.` `IFCEngine`(name, bases=(), attrs=None, __doc__=None, __module__=None)

  Bases: `zope.interface.Interface`

  An interface that exposes an EngineService over Foolscap.

  The methods in this interface are similar to those from IEngine, but their arguments and return values slightly different to reflect that FC cannot send arbitrary objects. We handle this by pickling/ unpickling that the two endpoints.

  If a remote or local exception is raised, the appropriate Failure will be returned instead.

  static `__init__`(name, bases=(), attrs=None, __doc__=None, __module__=None)

### Navigation

- index
- modules |
- next |
- previous |
- IPython v0.10 documentation »
- The IPython API »