subprocess woes
km
srikrishnamohan at gmail.com
Wed Aug 30 10:09:28 EDT 2006
Hi Dennis,
That works great ! thanks for the correction
regards,
KM
------------------------------------------------------
On 8/29/06, Dennis Lee Bieber <wlfraed at ix.netcom.com> wrote:
>
> On Tue, 29 Aug 2006 18:17:47 +0530, km <srikrishnamohan at gmail.com>
> declaimed the following in comp.lang.python:
>
> > ######code start ######
> > import subprocess as sp
> > x = 'GSQIPSHYWKKNLWYYSHEIDGGCHNMW'
> > p0 = sp.Popen(["echo",x], stdout=sp.PIPE)
>
> Why use this at all?
>
> > p1 = sp.Popen(["fasta34","-q","@",s],stdin=p0.stdout, stdout=sp.PIPE)
> > output = p1.communicate()[0]
>
> Just feed "x" to this directly... (untested):
>
> p1 = sp.Popen(["fasta34","-q","@",s],stdin=sp.PIPE, stdout=sp.PIPE)
> output = p1.communicate(x)[0]
> --
> Wulfraed Dennis Lee Bieber KD6MOG
> wlfraed at ix.netcom.com wulfraed at bestiaria.com
> HTTP://wlfraed.home.netcom.com/
> (Bestiaria Support Staff: web-asst at bestiaria.com)
> HTTP://www.bestiaria.com/
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060830/436f0716/attachment.html>
More information about the Python-list
mailing list