Simon Willison’s Weblog

Subscribe

Saturday, 9th May 2020

pyp: Easily run Python at the shell (via) Fascinating little CLI utility which uses some deeply clever AST introspection to enable little Python one-liners that act as replacements for all manner of pipe-oriented unix utilities. Took me a while to understand how it works from the README, but then I looked at the code and the entire thing is only 380 lines long. There’s also a useful --explain option which outputs the Python source code that it would execute for a given command.

# 9:05 pm / python, shell

2020 » May

MTWTFSS
    123
45678910
11121314151617
18192021222324
25262728293031