labscript_utils.ls_zprocess.ProcessTree

class labscript_utils.ls_zprocess.ProcessTree(shared_secret=None, allow_insecure=False, zlock_host=None, zlock_port=7339, zlog_host=None, zlog_port=7340)[source]

Bases: ProcessTree

A singleton zprocess.ProcessTree configured with settings from labconfig for security, zlock and zlog. Being a singleton is not enforced - the class can still be instantiated as normal - but calling the .instance() classmethod will give the singleton.

__init__(shared_secret=None, allow_insecure=False, zlock_host=None, zlock_port=7339, zlog_host=None, zlog_port=7340)[source]

Methods

__init__([shared_secret, allow_insecure, ...])

check_broker()

connect_to_parent()

event(event_name[, role, external_broker])

instance()

lock(key[, read_only])

Return a zprocess.locking.Lock for a resource identified by the given key.

logging_handler(filepath[, name])

Return a zprocess.zlog.ZMQLoggingHandler for the given filepath.

remote_process_client(host[, port])

Return a RemoteProcessClient configured with this ProcessTree's security settings

subprocess(path[, output_redirection_host, ...])

Start a subprocess and set up communication with it.

classmethod instance()[source]