On Apr 14, 2012, at 03:32 PM, Guido van Rossum wrote: >Funny, I was just thinking about having a simple standard API that >will let you open files (and list directories) relative to a given >module or package regardless of how the thing is loaded.
I tend to use the "basic resource access" API of pkg_resources. http://peak.telecommunity.com/DevCenter/PkgResources#basic-resource-access I'm not suggesting that we adopt all of pkg_resources, but I think the 5 functions listed there, plus resource_filename() (from the next section) provide basic functionality I've found very useful. -Barry _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com