Tuesday, March 5, 2013

Common standard modules in Python

os – functions for various operating system operations

os.path – functions for manipulating directory/folder path names

sys – functions for system-specific programs and services

time – functions for program timing and returning the current time/date in various formats

filecmp – functions for comparing files and directories

tempfile – functions for automatic creation and deletion of temporary files

glob – functions for matching wildcard-type file expressions (e.g., "*.txt")

shutil – functions for high-level file operations (e.g., copying, moving files)

struct – functions for storing numeric data as compact, binary strings

gzip, bz2, zipfile, tarfile – functions for writing to and reading from
various compressed file formats

pickle – functions for converting any Python object to a string that can be written to or subsequently read from a file

hashlib – functions for cryptography / encrypting strings

socket – functions for low-level networking

popen2 – functions for running other programs and capturing their output

urllib – functions for grabbing data from internet servers

ftplib, telnetlib – functions for interfacing with other computers through ftp
and telnet protocols

audioop, imageop – functions for manipulating raw audio and image data (e.g.,
cropping, resizing, etc.)

No comments: