### Navigation

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

# kernel.multienginefc

## Module: `kernel.multienginefc`

Inheritance diagram for `IPython.kernel.multienginefc`:

Expose the multiengine controller over the Foolscap network protocol.

## Classes

### `FCFullSynchronousMultiEngineClient`

class `IPython.kernel.multienginefc.``FCFullSynchronousMultiEngineClient`(remote_reference)

  Bases: `object`

  `__init__`(remote_reference)
  `adapt_to_blocking_client`()
  `clear_pending_deferreds`()
  `clear_properties`(targets='all', block=True)
  `clear_queue`(targets='all', block=True)
  `del_properties`(keys, targets='all', block=True)
  `execute`(lines, targets='all', block=True)
  `gather`(key, dist='b', targets='all', block=True)
  `get_ids`()
  `get_pending_deferred`(deferredID, block=True)
  `get_properties`(keys=None, targets='all', block=True)
  `get_result`(i=None, targets='all', block=True)
  `has_properties`(keys, targets='all', block=True)
  `keys`(targets='all', block=True)
  `kill`(controller=False, targets='all', block=True)
  `map`(func, *sequences)

    A parallel version of Python’s builtin map function.

    This method applies a function to sequences of arguments. It follows the same syntax as the builtin map.

    This method creates a mapper objects by calling self.mapper with no arguments and then uses that mapper to do the mapping. See the documentation of mapper for more details.

  `mapper`(dist='b', targets='all', block=True)

    Create a mapper object that has a map method.

    This method returns an object that implements the IMapper interface. This method is a factory that is used to control how the map happens.

    Parameters:

    dist : str

      What decomposition to use, ‘b’ is the only one supported currently

    targets : str, int, sequence of ints

      Which engines to use for the map

    block : boolean

      Should calls to map block or not

  `parallel`(dist='b', targets='all', block=True)

    A decorator that turns a function into a parallel function.

    This can be used as:

    @parallel() def f(x, y)

    > ...

    f(range(10), range(10))

    This causes f(0,0), f(1,1), ... to be called in parallel.

    Parameters:

    dist : str

      What decomposition to use, ‘b’ is the only one supported currently

    targets : str, int, sequence of ints

      Which engines to use for the map

    block : boolean

      Should calls to map block or not

  `pull`(keys, targets='all', block=True)
  `pull_function`(keys, targets='all', block=True)
  `pull_serialized`(keys, targets='all', block=True)
  `push`(namespace, targets='all', block=True)
  `push_function`(namespace, targets='all', block=True)
  `push_serialized`(namespace, targets='all', block=True)
  `queue_status`(targets='all', block=True)
  `raw_map`(func, sequences, dist='b', targets='all', block=True)

    A parallelized version of Python’s builtin map.

    This has a slightly different syntax than the builtin map. This is needed because we need to have keyword arguments and thus can’t use *args to capture all the sequences. Instead, they must be passed in a list or tuple.

    raw_map(func, seqs) -> map(func, seqs[0], seqs[1], ...)

    Most users will want to use parallel functions or the mapper and map methods for an API that follows that of the builtin map.

  `reset`(targets='all', block=True)
  `run`(fname, targets='all', block=True)
  `scatter`(key, seq, dist='b', flatten=False, targets='all', block=True)
  `set_properties`(properties, targets='all', block=True)
  `unpackage`(r)
  `zip_pull`(keys, targets='all', block=True)

### `FCSynchronousMultiEngineFromMultiEngine`

class `IPython.kernel.multienginefc.``FCSynchronousMultiEngineFromMultiEngine`(multiengine)

  Bases: `foolscap.referenceable.Referenceable`

  Adapt IMultiEngine -> ISynchronousMultiEngine -> IFCSynchronousMultiEngine.

  `__init__`(multiengine)
  `packageFailure`(f)
  `packageSuccess`(obj)
  `remote_clear_pending_deferreds`(*args, **kwargs)
  `remote_clear_properties`(*args, **kwargs)
  `remote_clear_queue`(*args, **kwargs)
  `remote_del_properties`(*args, **kwargs)
  `remote_execute`(*args, **kwargs)
  `remote_get_client_name`()
  `remote_get_ids`()

    Get the ids of the registered engines.

    This method always blocks.

  `remote_get_pending_deferred`(*args, **kwargs)
  `remote_get_properties`(*args, **kwargs)
  `remote_get_result`(*args, **kwargs)
  `remote_has_properties`(*args, **kwargs)
  `remote_keys`(*args, **kwargs)
  `remote_kill`(*args, **kwargs)
  `remote_pull`(*args, **kwargs)
  `remote_pull_function`(*args, **kwargs)
  `remote_pull_serialized`(*args, **kwargs)
  `remote_push`(*args, **kwargs)
  `remote_push_function`(*args, **kwargs)
  `remote_push_serialized`(*args, **kwargs)
  `remote_queue_status`(*args, **kwargs)
  `remote_reset`(*args, **kwargs)
  `remote_set_properties`(*args, **kwargs)

### `IFCSynchronousMultiEngine`

class `IPython.kernel.multienginefc.``IFCSynchronousMultiEngine`(name, bases=(), attrs=None, __doc__=None, __module__=None)

  Bases: `zope.interface.Interface`

  Foolscap interface to ISynchronousMultiEngine.

  The methods in this interface are similar to those of ISynchronousMultiEngine, but their arguments and return values are pickled if they are not already simple Python types that can be send over XML-RPC.

  See the documentation of ISynchronousMultiEngine and IMultiEngine for documentation about the methods.

  Most methods in this interface act like the ISynchronousMultiEngine versions and can be called in blocking or non-blocking mode.

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

## Function

`IPython.kernel.multienginefc.``packageResult`(wrappedMethod)

### Navigation

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