[Python-ideas] Re: `importlib.resources` access whole directories as resources

2022-05-17 Thread Christopher Barker
On Tue, May 17, 2022 at 1:46 PM Greg Werbin wrote: > 1) Allow a directory to be a resource in and of itself, and provide APIs > for working with "directory-type" resources. > I'm still confused here -- what would a "directory be a resource" even mean? A directory is not a file, it is a "contai

[Python-ideas] Re: `importlib.resources` access whole directories as resources

2022-05-17 Thread Greg Werbin
I think I might have confused things further, my apologies. I see 3 related but distinct feature requests here: 1) Allow a directory to be a resource in and of itself, and provide APIs for working with "directory-type" resources. 2) Allow resources with "/" in the name, and provide APIs to

[Python-ideas] Re: `importlib.resources` access whole directories as resources

2022-05-17 Thread Filipe Laíns
On Mon, 2022-05-16 at 14:36 +, Greg Werbin wrote: > Non-"binary" resources are already in widespread use, so perhaps that > requirement shouldn't be in the docs at all. In practice, a resource is "any > data file other than a Python source file." > > Moreover, I see no reason why a resource na

[Python-ideas] Re: `importlib.resources` access whole directories as resources

2022-05-17 Thread Filipe Laíns
On Mon, 2022-05-16 at 18:55 +1200, Greg Ewing wrote: > On 16/05/22 5:05 pm, Christopher Barker wrote: > > a directory is not a binary artifact -- it can't have actually data in > > it like a file can. > > and: > > > the entire > > point of resources is to provide an abstraction -- the individua