Table of Contents

Module: __init__ Bio/SCOP/tests/__init__.py
Imported modules   
import os
import sys
Functions   
findResource
  findResource 
findResource ( resource_name )

Return the location of the given resource.

It's convenient to store associated resource files (such as text files, or image files) within the Python package that uses them. This function will search the Python module path for these files, and return the absolute location of the file within the file system.

For example, suppose the package SomePackage contains a module, SomeModule.py, and an associated resource, SomeModule.txt. Then findResource("SomePackage/SomeModule.txt") will return the absolute path to the resource, which will look something like this: /usr/local/lib/python/site-packages/SomePackage/SomeModule.txt

Exceptions   
IOError( "Can't find file %s" % filename )

Table of Contents

This document was automatically generated on Mon Jul 1 12:02:55 2002 by HappyDoc version 2.0.1