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/2009-March/087701.html below:

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

[Python-Dev] "setuptools has divided the Python community" [Python-Dev] "setuptools has divided the Python community"Tarek Ziadé ziade.tarek at gmail.com
Thu Mar 26 20:41:50 CET 2009
On Thu, Mar 26, 2009 at 2:37 PM, Barry Warsaw <barry at python.org> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Mar 26, 2009, at 2:31 PM, Guido van Rossum 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__))
>>
>> Good idea. Can I suggest that API this takes a glob-style pattern? (Or
>> to be fully general, a list of patterns and a list of exclusion
>> patterns.)
>
> Good idea.  Thinking back on my typical use cases, a glob style pattern
> would be enough.  Usually I'm asking "give me all the .py files in this
> package" or "I'm looking for the .txt files in this path".

I think shutil.copytree new ignore mechanism handles this use case
pretty well (see the ignore_patterns factory in
http://docs.python.org/library/shutil.html)

Maybe we could use the same pattern.

Tarek
More information about the Python-Dev mailing list

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