[CentralOH] Filenames For Pipes?
jep200404 at columbus.rr.com
jep200404 at columbus.rr.com
Thu Aug 23 00:39:56 CEST 2012
On Mon, 20 Aug 2012 22:24:09 -0400, Neil Ludban <nludban at columbus.rr.com> wrote:
> On Mon, 20 Aug 2012 21:44:35 -0400
> jep200404 at columbus.rr.com wrote:
> > How can I do the following from within Python, without invoking
> > bash and without creating intermediate files? How can I get a
> > filename for a pipe or handle?
> >
> > diff <(gunzip <old.gz) <(gunzip <new.gz)
> /dev/fd/*
I'm using the following smelly code:
fd_name = '/dev/fd/%d' % file.fileno()
There have to be better ways. What are they?
More information about the CentralOH
mailing list