Package kiwi :: Module environ :: Class Application
[frames | no frames]

Class Application

Environment --+    
              |    
        Library --+
                  |
                 Application


Application extends a Library. It's meant to be used by applications

Libraries are usually instantiated in __init__.py in the topmost package in your library, an example usage is kiwi itself which does:
>>> from kiwi.environ import Application
>>> app = Application('gnomovision')
>>> if app.uninstalled:
>>>     app.add_global_resource('glade', 'glade')
>>>     app.add_global_resource('pixmap', 'pixmaps')
If you want to do translations, you also need to do the following:
>>> app.enable_translation()

See Also: Library for more information on how to integrate it with the standard distutils configuration.

Method Summary
  enable_translation(self, domain, localedir)
Enables translation for a application See Library.enable_translation.
  run(self)
    Inherited from Library
  add_global_resource(self, resource, path)
Convenience method to add a global resource.
  add_global_resources(self, **kwargs)
  set_application_domain(self, domain)
Sets the default application domain
    Inherited from Environment
  add_resource(self, resource, path)
  add_resources(self, **kwargs)
  find_resource(self, resource, name)
Locate a specific resource of called name of type resource
  get_log_level(self)
  get_resource_paths(self, resource)
  get_root(self)

Property Summary
    Inherited from Environment
  epydoc

Method Details

enable_translation(self, domain=None, localedir=None)

Enables translation for a application See Library.enable_translation.
Overrides:
kiwi.environ.Library.enable_translation

Generated by Epydoc 2.1 on Tue Feb 6 10:53:33 2007 http://epydoc.sf.net