How to list all functions in a Python module?

前端 未结 17 1730
野性不改
野性不改 2020-11-22 05:38

I have a python module installed on my system and I\'d like to be able to see what functions/classes/methods are available in it.

I want to call the doc function

17条回答
  •  旧时难觅i
    2020-11-22 06:16

    Once you've imported the module, you can just do:

    help(modulename)
    

    ... To get the docs on all the functions at once, interactively. Or you can use:

    dir(modulename)
    

    ... To simply list the names of all the functions and variables defined in the module.

提交回复
热议问题