Thomas Heller wrote: > Just van Rossum <just@letterror.com> writes: > > >>FWIW, I think it's generally a bad idea to depend on module.__file__ and >>pkg.__path__ to find data files. > > What would you suggest to do instead? There's now even such a case > in the standard library: distutils.command.bdist_wininst has > to find it's data-file 'wininst.exe'. I'd like to point out Java's solution to this. http://java.sun.com/j2se/1.4.1/docs/api/java/lang/ClassLoader.html#getResource(java.lang.String) Since Python doesn't have the complication of multiple class loaders, getResource() (or whatever name it gets in Python) and its peers could be module-level functions somewhere (such as pkgutils). Shane
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4