def install(cls, mbox):
    """A decorator to indicate a remotely callable method on a process.

    .. code-block:: python

        from compactor.process import Process

        class PingProcess(Process):
          @Process.install('ping')
          def ping(self, from_pid, body):
            # do something

    The installed method should take ``from_pid`` and ``body`` parameters.
    ``from_pid`` is the process calling the method.  ``body`` is a ``bytes``
    stream that was delivered with the message, possibly empty.

    :param mbox: Incoming messages to this "mailbox" will be dispatched to this method.
    :type mbox: ``str``
    """
    def wrap(fn):
      setattr(fn, cls.INSTALL_ATTRIBUTE, mbox)
      return fn
    return wrap
def install ( cls , mbox ) : def wrap ( fn ) : setattr ( fn , cls . INSTALL_ATTRIBUTE , mbox ) return fn return wrap
A decorator to indicate a remotely callable method on a process.

    .. code-block:: python

        from compactor.process import Process

        class PingProcess(Process):
          @Process.install('ping')
          def ping(self, from_pid, body):
            # do something

    The installed method should take ``from_pid`` and ``body`` parameters.
    ``from_pid`` is the process calling the method.  ``body`` is a ``bytes``
    stream that was delivered with the message, possibly empty.

    :param mbox: Incoming messages to this "mailbox" will be dispatched to this method.
    :type mbox: ``str``