Re: [Python-ideas] importlib: making FileFinder easier to extend

2018-02-20 Thread Brett Cannon
Basically what you're after is a way to extend the default finder with a new file type. Historically you didn't want this because of the performance hit of the extra stat call to check that new file extension (this has been greatly alleviated in Python 3 through the caching of directory contents).

[Python-ideas] importlib: making FileFinder easier to extend

2018-02-07 Thread Erik Bray
Hello, Brief problem statement: Let's say I have a custom file type (say, with extension .foo) and these .foo files are included in a package (along with other Python modules with standard extensions like .py and .so), and I want to make these .foo files importable like any other module. On its