Python is probably not your first thought when it comes to opening zip archives or compressing directories. In fact, if you’re like me, zip means something rather different… For most needs of handling zip archives, your favourite shell or window GUI handles most of your needs. In fact, if you want Python to emulate this…
Category: motw
string — Common string operations (Part 1: methods)
The string module provides a number of methods and constants for manipulating strings (type: str). These work on all strings in Python which are created using quotation marks: ‘single’, “double”, ”’triple-single”’, and “””triple-double”””-quoted text. Strings can also be created by applying the built-in str( ) function to any other datatype. In Python, strings are immutable…
pathlib
— Object-oriented filesystem paths
The pathlib module was introduced in Python 3.4 (see PEP-428) — or, more accurately, pathlib was a 3rd party module which was added to the standard library (i.e., the packages that come with all installs of Python — unless excluded for, e.g., including library on smaller devices). It was attempting to provide a more friendly,…