Python Forum

Full Version: list of functions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi,
i'm a total beginner.
how can i list all the functions in a module?

example : import * from os

which are all the components of "os"?

thanks
regards
  • import module
  • dir(module)

Example:
import os

for item in dir(os):
    print(item)
super!!!
You can also use help() interactively
>>> import os
>>> help(os)
There is also
import webbrowser
word = "os"
webbrowser.open("https://docs.python.org/{}/search.html?q={}".format(3, word))