Python offers a lot of tools to easily deal with local and Internet files. We will present a selection of these tools illustrated with nice examples.
This will be presented in two parts.
- Part I: Local Files
- pathlib: the pythonic way to manipulate files;
- gzip / zipfile: compress transparently;
- tempfile / io: no more mess to clean.
- Part II: Internet
- requests: retrieve Internet files;
- BeautifulSoup: parse HTML like a charm;
- Selenium: when everything else fails.