Mailing List Archive

Introducing Plumbum: Shell Combinators
Write shell-like scripts in pure python (and never resort to writing bash scripts again!)

Plumbum provides local and remote process execution, path abstraction, lots of shell-like utilities and a command-line interface (CLI) application toolkit that beats optparse/argparse to the ground. Give it a try.

>>> from plumbum.cmd import ls, grep, wc, cat, head
>>> ls()
>>> (ls["-a"] | grep["-v", "\\.py"] | wc["-l"])
>>> ((cat[""] | head["-n", 4]) > "output.txt")()
>>> cat("output.txt")
u'#!/usr/bin/env python\nimport os\n\ntry:\n'

Support the Python Software Foundation: