Other Built-in Modules
See the Python library reference manual (available at http://www.python.org) for details on other standard modules available to Python programmers. A partial sampling of commonly-used modules follows.
socketInterfaces for sending and receiving data over BSD-style sockets (an object with socket call methods).
rexecSupport for restricted (trusted/safe) execution mode. Especially useful for Internet-related applications.
TkinterInterface to Python’s integration of the Tk GUI API. Used for writing portable graphical interfaces with native look-and-feel on X-Windows, MS-Windows, and Macintosh. Widgets are customizable classes (e.g., Button, Frame), options are keyword arguments, and composition is object embedding (not paths).
selectInterfaces to UNIX select function. Wait for activity on one of N files or sockets (multiplex).
signalInterfaces for processing signals in Python programs.
thread, threadingPython’s thread interface (lightweight processes which share global data). Tools to start, stop, synchronize.
cgiInterfaces for parsing and accessing form information in CGI Internet scripts. After a script calls “form = cgi.FieldStorage( ),” form is a dictionary-like object with one entry per form field (form [“name” ].value).
urllib, httplib, HTMLlibAccessing arbitrary Internet URLs like files, http protocol tools, parsing HTML files.
ftplibInterfaces for Internet file transfers in Python programs. After “ftp=ftplib.FTP(‘sitename’),” ftp has methods for login, changing ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access