|
Application modules is what you write as you develop an application.
Each module is a separate Python source file which just happens to
be residing in specific cage's directory.
For example, if Pythomnic is installed in c:\pythomnic then cage
"foo" will entirely reside in c:\pythomnic\cages\foo and its application
modules will go to the c:\pythomnic\cages\foo\modules directory.
Foo's module "bar" will then be in c:\pythomnic\cages\foo\modules\bar.py.
From the developer's point of view, each module is a component which
exposes one or more methods to other modules on the same cage or
different cages. For example, if mentioned module bar.py contains
def some_method(*args, **kwargs):
return result
# EOF
then other modules on the same cage can access the defined
method as
result = pmnc.bar.some_method(*args, **kwargs)
whereas modules on other cages would use an explicit call
of this form
result = pmnc.execute.on("foo").bar.some_method(*args, **kwargs)
The extensive coverage of Pythomnic facilities available to your
application modules is also provided by annotated code sample files,
included in cages/template/samples directory of the distribution
package.
|
Features Download Documentation Tutorial |