grafoo / pypeutils

shell syntax pipes for python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About

Already got yourself some shiny binutils, coreutils, diffutils, findutils, …? You regularly pipe those guys together, producing oneliners from hell? Ever wished you could fire up those quick n’ dirty scripts directly in python? Now your wildest pipe dreams are just one import away!

Usage

# Print output using builtins.print
>>> from pypeutils import Util, printf
>>> rev = Util("rev")
>>> output = printf("dog") | rev()
>>> print(output)
god

# Write to stdout using the quick print operator
>>> from pypeutils import echo
>>> -echo("Kwik-E-Mart")
Kwik-E-Mart
>>> -(echo("lager") | rev())
regal

About

shell syntax pipes for python


Languages

Language:Python 100.0%