[bip] replacing those shell scripts ... the PipeChain

James Casbon casbon at gmail.com
Thu May 7 14:15:51 PDT 2009


2009/5/7 Matt Dimmic <reg at plaguerats.net>:
> James,
>
> Are you familiar with the pipes module in the Python standard library? I
> don't have experience with it myself, but it seems to smooth out the bumps
> you mention:
>
> http://www.doughellmann.com/PyMOTW/pipes/index.html

It's interesting seeing someone else's choices.  pipes seems very
nice, but puts everything in temporary files, which is not what I
wanted.  It also has the $IN $OUT magic names which is easier for
badly behaved commands than assuming a command reads from stdin and
writes to stdout.

I want to ask my initial question again, which was badly phrased.  You
have a generator, and a program that needs a file handle.  Can you
adapt the generator to the file handle without consuming the whole
thing?



More information about the biology-in-python mailing list