Pyro_ns

Pyro module management.

Use this module to manage a Pyro name server.

Classes

class servermgr.pyro_ns.Manager(host, port, data_dir, name='pyro_ns', process_name='Pyro NameServer', **kwargs)[source]

Pyro manager object.

Parameters:
  • host – the interface to listen on.
  • port (int) – the port to listen on.
  • data_dir – name of the pyro data directory
  • name – the program name
  • process_name – the string to diplay in ‘ps’
health()[source]

Check Pyro health.

Raises :base.WorkerError if we cannot locate the Pyro name server.
process

Return the process object.

ready_wait(timeout=10.0, verbose=False)

Wait until the worker subprocess is responding to requests.

Parameters:
  • timeout (float, seconds) – Give the server this many seconds to start. If the timeout expires before the server has started, kill the server and raise WorkerError.
Raises :

WorkerError if the worker is not ready within the time limit.

Raises :

WorkerError if there is no subprocess.

start(wait=True, timeout=10.0)[source]

Launch the Pyro name server in its own process.

Parameters:
  • wait – If true, call self.ready_wait() after starting the subprocess.
  • timeout (float, number of seconds) – When calling ready_wait(), use this timeout value.
Raises :

base.WorkerError if the worker hasn’t started before timeout elapses.

stop(wait=True)

Terminate the worker subprocess.

Parameters:
  • wait (boolean) – If True, wait for the worker to exit.
wait()

Wait for the worker process to exit.

Running pyro.py

servermgr.pyro_ns.main()[source]

You can use this script to start a copy of the pyro nameserver; however, you could just as easily run the pyro-ns script installed by pyro.

Usage: pyro.py [options]

Options:
-h, --help show this help message and exit
-H HOST, --host=HOST
 Pyro nameserver hostname
-p PORT, --port=PORT
 Pyro nameserver port
-d DATADIR, --datadir=DATADIR
 Pyro data directory

Table Of Contents

Previous topic

Django_app

Next topic

Pyro_service

This Page