A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-December/031232.html below:

[Python-Dev] Re: [Zope3-dev] Zip import and sys.path manipulation (was Re: directory hierarchy proposal)

[Python-Dev] Re: [Zope3-dev] Zip import and sys.path manipulation (was Re: directory hierarchy proposal) [Python-Dev] Re: [Zope3-dev] Zip import and sys.path manipulation (was Re: directory hierarchy proposal)Shane Hathaway shane@zope.com
Mon, 16 Dec 2002 14:37:42 -0500
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