Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
list of functions
#1
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
Reply
#2
  • import module
  • dir(module)

Example:
import os

for item in dir(os):
    print(item)
Reply
#3
super!!!
Reply
#4
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))
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  list all functions in a package aka 5 1,801 Mar-16-2022, 07:38 AM
Last Post: aka
  Multiple lambda functions in zipped list not executing psolar 0 1,623 Feb-13-2020, 12:53 PM
Last Post: psolar

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020