[Python-Dev] "setuptools has divided the Python community"

Barry Warsaw barry at python.org
Thu Mar 26 20:22:24 CET 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mar 26, 2009, at 1:54 PM, Guido van Rossum wrote:

> 2009/3/26 Toshio Kuratomi <a.badger at gmail.com>:
>>
>>>
>> Depending on the definition of a "resource" there's additional
>> information that could be needed.  For instance, if resource includes
>> message catalogs, then being able to get the base directory that the
>> catalogs reside in is needed for passing to gettext.
>
> Well the whole point is that for certain loaders (e.g. zip files)
> there *is* no base directory. If you do need directories you won't be
> able to use PEP-302 loaders, and you can just use
> os.path.dirname(<some_module>.__file__).

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__))

Barry

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iQCVAwUBScvV8HEjvBPtnXfVAQIvdQP/dwzTsPLVtM4eAKLRfzJHG7mToNVDgHNn
4L6Kh99sScVOpeYPw8tltX5YAFwDeysIiDl3L8ynS/iN4/RIVsssO97vK3nENQxE
myQVfapmY0yhYrCJSYLthkaOoADB4D8pBTCbvVRwT7B4DXuVhxGpebWFVi+gSWNi
ZZjDjUQ9fSk=
=REBP
-----END PGP SIGNATURE-----


More information about the Python-Dev mailing list