API Reference for Enthought Tool Suite 3.2.0
Utility functions for managing and finding resources (ie. images/files etc).
get_path : Returns the absolute path of a class or instance
Creates a name starting with 'prefix' that is not in 'names'.
Returns a file object or file path pointing to the desired resource.
This function will find a desired resource file and return an opened file object. The main method of finding the resource uses the pkg_resources resource_stream method, which searches your working set for the installed project specified and appends the resource_path given to the project path, leading it to the file. If setuptools is not installed or it cannot find/open the resource, find_resource will use the sys.path[0] to find the resource if alt_path is defined.
Returns an absolute path for the specified path.
'path' can be a string, class or instance.
Store the content of a resource, given by the name of the projet and the path (relative to the root of the project), into a newly created file.
The first two arguments (project and resource_path) are the same as for the function find_resource in this module. The third argument (filename) is the name of the file which will be created, or overwritten if it already exists. The return value in always None.
| Local name | Refers to |
|---|---|
| inspect | inspect |
| os | os |
| sys | sys |
© Copyright 2002-2009 Enthought, Inc.