[Python-ideas] __dir__ in which folder is this py file
Eric Fahlgren
ericfahlgren at gmail.com
Wed May 16 10:00:00 EDT 2018
On Tue, May 15, 2018 at 10:11 PM Rob Speer <rspeer at luminoso.com> wrote:
> From what I can tell, if you wanted to exclude '__init__.py' from Nginx in
> particular, you would have to write an unconventional Nginx configuration,
> where you determine whether a path refers to a static file according to a
> regex that excludes things that end in '__init__.py'. Anything is possible,
> but this would be a significant discouragement to using importlib.
>
Ok, I haven't dug into the details ("It should be easy!" :) ), but
couldn't you implement a Finder that based its search on, say, 'data.toc'
instead of '__init__.py' and graft it into importlib.resources?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180516/ebfc6e0d/attachment.html>
More information about the Python-ideas
mailing list