gl...@divmod.com wrote: > On 26 Mar, 07:22 pm, ba...@python.org wrote: >> One thing that /would/ be helpful though is the ability to list all >> the resources under a specific package path. This is (I think) one >> use case that pkg_resource fails to support and it's the one place >> that I've had to drop down to file system introspection. >> >> Think: the package-y flavor of >> os.listdir(os.path.dirname(package.__file__)) > > FWIW, the Twisted spelling of this is: > > from twisted.python.modules import getModule > getModule(__name__).filePath.parent().listdir() > > (and yes, this works with zip files)
Careful, Glyph. Nobody likes a smart-ass ;-) regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ Want to know? Come to PyCon - soon! http://us.pycon.org/ _______________________________________________ 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