I would like to keep a resource file (which is really anything shared among scripts but not Python itself) in my PYTHONPATH so that it can be used by modules that are in that path, which are in turn invoked by different end scripts/apps.
PYTHONPATH
|
|--Module1.py
|--Module2.py
|--Resource.res
Is there a way I can easily reference a resource (Resource.res) file that is located under the PYTHONPATH hierarchy along with actual Python modules that are shared, without supplying the full path to the file? There is equivalent way of getting a resource file from Java's classpath, which is where I'm getting the idea.
The contents of the resource file should be irrelevant but just for illustration's sake, it could be anything non-pythonic, such as random data, config, etc.