Text
string: General string operations re: Regular expression operations difflib: Difference calculation tool textwrap: Text filling unicodedata:Unicode Character database stringprep: Internet string preparation tool readline:GNU Read interface by line rlcompleter:GNU Read by line implementation function
binary data
struct: Parse bytes into packed binary data codecs: Registry and base class codec
data type
datetime: Tools based on date and time calendar: General month function collections: Container data type collections.abc: Container virtual base class heapq: Heap queue algorithm bisect: Array bisection algorithm array: Efficient array of values weakref: Weak reference types: Dynamic creation and naming of built-in types copy: Shallow copy and deep copy pprint: Format output reprlib: alternate repr() The implementation of the
mathematics
numbers: The virtual base class of a number math: Mathematical functions cmath: Mathematical functions of complex numbers decimal: Fixed point number and floating point number calculation fractions: Rational number random: Generate pseudo-random numbers
Functional programming
itertools: Generate iterators for efficient loops functools: Higher order functions and operations on callable objects operator: Standard operations for functions
Files and directories
os.path: Generic pathname control fileinput: Traversing rows from multiple input streams stat: explain stat() Result filecmp: File and directory comparison function tempfile: Generate temporary files and directories glob:Unix Style pathname format extension fnmatch:Unix Style path name format comparison linecache: Random storage of text lines shutil: Advanced file operations macpath:MacOS 9 Path control function
Persistence
pickle:Python Object serialization copyreg: Registration machine pair pickle Support functions for shelve:Python Object persistence marshal: Inside Python Object serialization dbm:Unix“ database ” Interface sqlite3: in the light of SQLite Database API2.0
Compress
zlib: compatible gzip Compression of gzip: Yes gzip File support bz2: Yes bzip2 Compression support lzma: Use LZMA Algorithm compression zipfile: operation ZIP The archive tarfile: Reading and writing tar Archive file
File format
csv: Reading and writing CSV file configparser: Profile parser netrc:netrc File processor xdrlib:XDR Data encoding and decoding plistlib: Generate and parse Mac OS X.plist file
encryption
hashlib: Secure hash and message digest hmac: Key hash for message authentication
Operating system tools
os: Multiple operating system interfaces io: Stream core tools time: Time query and conversion argparser: Command line options 、 Parsers for parameters and subcommands optparser: Command line options parser getopt:C Style command line options parser logging:Python Logging tools logging.config: Log configuration logging.handlers: Log processor getpass: Easy password input curses: Terminal processing of character display curses.textpad:curses The text input field of the program curses.ascii:ASCII Character set tools curses.panel:curses Control stack extension platform: Access to the underlying platform authentication data errno: Standard error mark ctypes:Python External function library
Concurrent
threading: Thread based parallelism multiprocessing: Process based parallelism concurrent: Contract issuance concurrent.futures: Start parallel tasks subprocess: Subprocess Management sched: Event scheduling queue: Synchronous queue select: wait for I / O complete dummy_threading:threading Replacement of modules ( When _thread Is not available ) _thread: The underlying thread API(threading Based on it ) _dummy_thread:_thread Replacement of modules ( When _thread Is not available )
Interprocess communication
socket: The underlying network interface ssl:socket Object's TLS / SSL Stuffer asyncore: Asynchronous socket processor asynchat: Asynchronous socket command / Response processor signal: Asynchronous transaction signal processor mmap: Memory mapped files support