Paul Moore wrote: > It's an interesting idea, but like others, I think that it's not going > to work right in practice. The main problem is that you don't explain > how to implement this version of imp.find_module in terms of the > importer protocol defined in the hooks PEP. I am exploring the idea of adding the feature to imp.find/load_module keeping the existing logic. I am not using the hooks PEP because I think the hooks PEP is a bad idea. Anyway, after some thought, I think my idea of a file-like object is not good. The easiest solution is to add a get_data() to go with find_module() and load_module(). The function signature of get_data() (or maybe "get_module()") is the same as that of load_module(), and the interface is: file, pathname, desc = imp.find_module(name, path=p, suffix=s) bytes = imp.get_data(name, file, pathname, desc) JimA
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