Modules
- A file containing code
- file name is the module name
- allows organization at a file level
- can contain any number of
- objects
- functions
- classes
Module Locations
- Current working directory
- Any directory in the system path (sys.path)
- contains most built-in modules
- sys.path is set by the PYTHONPATH
Built-in Modules
- Daa Typs
- Numeric and Math
- File Handling
- OS
- Concurrency
- Internet
- Data Persistence
Data Types
calendar
- provides useful functions to output calendar data
datetime
- for manipulation date and times
collections
- a set of additional collection data types providing alternatives to dict, list, set and tuple
Numeric and Math
math
- provides access to mathematical functions
cmath
- mathematical functions for complex numbers
statistics
- for calculating statistics of numeric data
fractions
- support for rational number arithmetic
random
- random number generators
File Handling
pathlib
- object oriented handling of filesystem paths
filecmp
- file and directory comparisons
shutils
- high level file operations (copying and removing directories)
Operating System
os
- miscellaneous operating system interfaces
logging
- logging facility
argparse
- parse for command line options and arguments
platform
- access to underlying platforms’s identifying data
Concurrency
threating
- thread-based parallelism
multiprocessing
- process based parallelism
subprocess
- subprocess management
sched
- even scheduler
Data Persistence
squlite3
- interface to SQLite database
pickle
- object serialization
shelve
- object persistence
Internet
socket
- low-level networking interface
ssl
- SSL wrapper for socket objects
- email and MIME handline package
json
- JSON encoder and decoder
mailboc
- manipulate mailboxes in varios formats