P.J. Eby wrote:
Ah, okay. I assume this will only work for packages that use setuptools?
Or distribute. Or pip (I assume). Anything but plain distutils, basically.
Well, the packages import setup from setuptools for all of the above, apart from plain distutils ;-)
How do static resources returned with pkg_resources.resource_filename and friends fare when packages are installed in a "flat" form?
They go in the same relative location as they would in an egg, it's just that in flat layouts everyone's files are in the same namespace.
Sort of a "scrambled egg", if you will. ;-)
Okay, so if we have two distributions, x.a and x.b both define template folders called 'templates', and each has a template called 'master', what ends up on disk? what does pkg_resources.resource_filename('x.a','templates/master') return? It should be different to pkg_resources.resource_filename('x.b','templates/master'), but will it be? cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk