How to get a list of built-in modules in python?

前端 未结 6 1490
野的像风
野的像风 2020-12-04 14:22

I would like to get a list of names of built-in modules in python such that I can test the popularity of function\'s naming conventions (underline, CamelCase or mixedCase).<

6条回答
  •  再見小時候
    2020-12-04 14:48

    How about this? Though, this gets a list of built-in functions and variables rather than modules...

    dir(__builtins__)
    

    help('modules') will give you a list of all modules, according to How can I get a list of locally installed Python modules?. Not a list of strings, though.

提交回复
热议问题