### Navigation

- index
- modules |
- next |
- previous |
- Camelot documentation »
- Camelot API »
- core »

# resources

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.

`camelot.core.resources.``resource_filename`(module_name, filename)

  Return the absolute path to a file in a directory using pkg_resources

`camelot.core.resources.``resource_string`(module_name, filename)

  load a file as a string using pkg_resources

### Navigation

- index
- modules |
- next |
- previous |
- Camelot documentation »
- Camelot API »
- core »

Comments
blog comments powered by Disqus