The pipes module

(Unix only). This module contains support functions to create “conversion pipelines”. You can create a pipeline consisting of a number of external utilities, and use it on one or more files.

 
Example: Using the pipes module
# File: pipes-example-1.py

import pipes

t = pipes.Template()

# create a pipeline
t.append("sort", "--")
t.append("uniq", "--")

# filter some text
t.copy("samples/sample.txt", "")

Alan Jones (sensible party)
Kevin Phillips-Bong (slightly silly)
Tarquin Fin-tim-lin-bin-whin-bim-lin-bus-stop-F'tang-F'tang-Olé-Biscuitbarrel

[comment on/vote for this article]

A Django site. this page was rendered by a django application in 0.00s 2012-05-25 18:33:19.005894. hosted by webfaction.