Package Camelot :: Package camelot :: Package core :: Module resources |
[frames] | no frames]

# Module resources

source code

wrapper around pkg_resources, with fallback to using directories specified in the settings file if pkg_resources cannot be used.

to allow fallback to the settings file, specify the settings_attribute method, this is the attribute in the settings file that contains the folder with the resources as opposed to the folder containing the module itself.

this mechanism will probably be rewritten to support the loading of resources from zip files instead of falling back to settings.

when running from a bootstrapper, we'll try to use pgk_resources, even when runnin from within a zip file.

Functions
resource_filename(module_name, filename, settings_attribute=None) Return the absolute path to a file in a directory if the directory for the module cannot be accessed through pkg_resources, fall back to the settings attribute | source code
resource_string(module_name, filename, settings_attribute) | source code

Variables
| logger = `logging.getLogger('camelot.core.resources')`
| __package__ = ``'``Camelot.camelot.core``'``