Package SPyRO :: Module SPyRO :: Class CodePool
[show private | hide private]
[frames | no frames]

Class CodePool


Register python modules and executes functions in modules. The registration of objects must not be used, instead a list of module's path is given. The registrarion is supported to serve setsend calls. The getobj method reads modules from path. The module is loaded the first time that is requested, next requests uses a cached version of the module. If the module changes in the disk, is reloaded. Every time that the module is readed it can execute global statments
Method Summary
  __init__(self, path)
Init the ServerObjectPool object with a
  _import_(self, name, _globals, _locals, fromlist)
Replace function of __import__ to support import modules from the code pool
  delobj(self, name)
Remove an object with name |name|
  getobj(self, name)
Get an object and its authorization data, it must raise a KeyError exception if |name| is not present in the pool
  loadmodule(self, name, authobj)
Loads a python's module in the object path (self.path) The authority object is set to the |_spyro_authentication| global variable in the module.
  setobj(self, name, obj, authobj)
Register an object |obj| with the ID |name|
  setsend(self, ret, auth)
Register an object (to send by reference)

Method Details

__init__(self, path)
(Constructor)

Init the ServerObjectPool object with a

_import_(self, name, _globals, _locals, fromlist)

Replace function of __import__ to support import modules from the code pool

delobj(self, name)

Remove an object with name |name|

getobj(self, name)

Get an object and its authorization data, it must raise a KeyError exception if |name| is not present in the pool

loadmodule(self, name, authobj)

Loads a python's module in the object path (self.path) The authority object is set to the |_spyro_authentication| global variable in the module. If it is not present the |authobj| argument is used instead.

setobj(self, name, obj, authobj=None)

Register an object |obj| with the ID |name|

setsend(self, ret, auth=None)

Register an object (to send by reference)

Generated by Epydoc 2.1 on Sat Oct 14 11:50:52 2006 http://epydoc.sf.net