stdlib-list
stdlib-list copied to clipboard
Add fetching plugins?
The current fetching code is great for when you don't have a particular Python version installed, but with Travis and Appveyor it should be possible to use the real interpreter. E.g. the following code gets a number of new modules, including undocumented and C-modules that the current fetching code doesn't find:
>>> import sys, os
>>> for module in {os.path.splitext(f)[0] for f in os.listdir('.') if f != 'antigravity'}:
... try:
... __import__(module)
... except:
... pass
...
<module 'abc' from 'C:\Python27\lib\abc.pyc'>
<module 'aifc' from 'aifc.py'>
<module 'anydbm' from 'anydbm.py'>
...
>>> sys.modules.keys()
['filecmp', 'heapq', 'code', 'curses.sys', 'distutils', 'ensurepip.sys', 'functools', 'random',
'_bisect', ...]
_bisect being such a module.
This method doesn't find other stdlib modules, e.g. new, so it can't be the only method. Perhaps a list of fetching plugins could create an initial list?
There are also a few other projects that have created lists of stdlib modules (e.g. https://github.com/timothycrosley/isort/blob/develop/isort/settings.py) -- we should incorporate these liberally ;-)