[issue45427] importlib.readers.MultiplexedPath

2021-10-18 Thread David Rajaratnam
David Rajaratnam added the comment: Hi Jason, Thanks for the extra pointers. My initial intention in explaining my use-case was to find out whether treating an externally embedded interpreter's files as `importlib.resources` is the correct use of this library. However, you're right

[issue45427] importlib.readers.MultiplexedPath

2021-10-17 Thread David Rajaratnam
David Rajaratnam added the comment: I'm closing the bug report. Clearly not a bug. It looks like importlib.resources.as_file() is exactly what I want. It returns a context and can potentially create a temporary file system directory structure with all files I want underneath. Not sure how I

[issue45427] importlib.readers.MultiplexedPath

2021-10-17 Thread David Rajaratnam
David Rajaratnam added the comment: Hi Filipe, Thanks very much for the pointers and for the clarifications. I'll look at using importlib.resources.as_file(). I think this is the API that I stupidly seemed to have missed! However, it is also very possible that I am misunderstanding

[issue45427] importlib.readers.MultiplexedPath

2021-10-11 Thread David Rajaratnam
David Rajaratnam added the comment: Thanks for the quick response. I think the attached file shows the issue. In the directory where you download and run this file create a sub-directory 'data'. Then running the file creates the output (note: I've truncated the path name): > Traverse d

[issue45427] importlib.readers.MultiplexedPath

2021-10-11 Thread David Rajaratnam
New submission from David Rajaratnam : I'm trying to use `importlib.resources.files()`. However, I cannot work out how to properly use the `importlib.readers.MultiplexedPath()` object that is returned. As I expect and want, the returned object is referring to a directory, but I cannot seem