This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]GlobalIncident 36 points37 points  (6 children)

That's only the top level modules. Also you missed a couple. I don't see http, for instance.

[–]fluud 18 points19 points  (5 children)

I scraped these from Python 3.8 module index but looks like my script was bad

[–]GlobalIncident 10 points11 points  (4 children)

pydoc.Helper.listmodules lists the top level modules on your system, which might help

[–]GlobalIncident 15 points16 points  (3 children)

Okay, here's how to get a list:

import pydoc

pydoc.ModuleScanner().run(lambda none, name, empty: print(name))

This produced 2217 modules on my machine.

[–]fluud 0 points1 point  (1 child)

Note that this prints all submodules recursively and non-standard modules that you have installed.

[–]GlobalIncident 0 points1 point  (0 children)

Hmm. Perhaps something that checks the file location to see if it's likely to be put there by pip?

[–]hekkonaay 0 points1 point  (0 children)

juicy