Package SPyRO :: Module codepools :: Class ModulePool
[hide private]
[frames] | no frames]

Class ModulePool

source code

ServerObjectPool --+
                   |
                  ModulePool

Register python modules as SPyRO objects. The modules must exists in a given path and will be appended to system path (sys.path) if the path is not in the sys.path.

If the source code changes, the module will be reloaded. The packages can exists in a zip files too, or any other supported python package container, just giving the |statfunction| like os.stat function

Instance Methods [hide private]
 
__init__(self, path, checkupdates=True, statfunction=<built-in function stat>)
Initialize the pool
source code
 
getobj(self, name)
Get an object and its authorization data, it must raise a KeyError exception if |name| is not present in the pool
source code

Inherited from ServerObjectPool: delobj, setobj, setsend

Method Details [hide private]

__init__(self, path, checkupdates=True, statfunction=<built-in function stat>)
(Constructor)

source code 
Initialize the pool
Overrides: ServerObjectPool.__init__

getobj(self, name)

source code 
Get an object and its authorization data, it must raise a KeyError exception if |name| is not present in the pool
Overrides: ServerObjectPool.getobj