register#
method
- Daemon.register(obj_or_class, objectId=None, force=False, weak=False)[source]#
Register a Pyro object under the given id.
Note that this object is now only known inside this daemon, it is not automatically available in a name server. This method returns a URI for the registered object. Pyro checks if an object is already registered, unless you set force=True. You can register a class or an object (instance) directly. For a class, Pyro will create instances of it to handle the remote calls according to the instance_mode (set via @expose on the class). The default there is one object per session (=proxy connection). If you register an object directly, Pyro will use that single object for all remote calls. With weak=True, only weak reference to the object will be stored, and the object will get unregistered from the daemon automatically when garbage-collected.