Screwtape

Screwtape at

Somebody filed a bug on a Python library I wrote ages ago, so I'm back in the Python ecosystem for a bit.

I wanted to parse a filename from the command-line, and the standard library's argparse module has a FileType helper that does just that, and handles the "dash means stdin" convention and everything. Huzzah!

Unless you need to read from the file in binary mode, in which case you get bitten by Issue 14156, created and a bugfix created in 2012 and not yet resolved. *sigh*

clacke@libranet.de ❌ likes this.