Posts
Python Basics: Read Tar Members Without Extracting Files
An archive inspection script can list metadata or read a selected member without unpacking paths onto disk. tarfile exposes both member information and file-like streams. These …
October 23, 2026
Python Basics: Read Package Assets with importlib.resources
A packaged application may need a template or a small data file shipped beside its Python code. Building a path from the current working directory breaks when the caller runs …
October 23, 2026
Python Basics: Query and Process XML with ElementTree
A small XML export can contain namespaces, optional fields, and repeated records. ElementTree lets a script query that structure without treating markup as plain text. The examples …
October 23, 2026
Python Basics: Inspect Source Structure with ast
A maintenance script can inspect Python source without importing the module. The ast module turns source text into syntax nodes, which helps list definitions, inventory imports, …
October 23, 2026
Python Basics: Check Call Shapes with inspect.signature
A command adapter often receives positional arguments and named options before it calls a trusted function. inspect.signature can show the accepted shape and bind proposed …
October 23, 2026
Linux Basics: Translate, Delete, and Squeeze Characters with tr
Some text cleanup needs only a character-level transformation, not a full pattern-matching language. GNU tr reads standard input and writes a transformed stream. These examples …
October 23, 2026
Linux Basics: Put a Deadline on Commands with GNU timeout
A scheduled check should not wait forever for a command that has stopped responding. GNU timeout starts another program with a deadline. These small experiments distinguish a …
October 23, 2026
Linux Basics: Format and Parse Size Values with GNU numfmt
A report containing 5242880 is exact but not always easy to scan. GNU numfmt can render numbers with readable units, parse unit-suffixed values, and convert one field without …
October 23, 2026
Linux Basics: Divide Files and Work Lists with GNU split
A large text export or a list of tasks is easier to handle in smaller pieces. GNU split can create line-based batches, fixed-size byte fragments, or one slice of a round-robin …
October 23, 2026
Linux Basics: Coordinate Shell Jobs with flock
Two copies of a maintenance job can accidentally work on the same output at once. The util-linux flock command lets cooperating processes agree on a lock before entering that work. …
October 23, 2026