Modules for files¶
Built-in modules¶
The Python standard library contains a number of built-in modules that you can use to manage files:
Module |
Description |
---|---|
performs common pathname manipulations |
|
manipulates pathnames |
|
iterates over multiple input files |
|
compares files and directories |
|
creates temporary files and directories |
|
use UNIX-like path and file name patterns |
|
randomly accesses lines of text |
|
performs higher level file operations |
|
Assignment of file names to MIME types |
|
enable Python object serialisation and persistence, see also The pickle module |
|
reads and writes CSV files |
|
JSON encoder and decoder |
|
provides a DB-API 2.0 interface for SQLite databases, see also The sqlite module |
|
|
reads and writes XML files, see also R:doc:../save-data/xml |
Parsing HTML and XHTML |
|
reads and writes Windows-like configuration files ( |
|
encodes/decodes files or streams |
|
reads and writes structured data to and from files |
|
for working with archive files and compressions |