Running a program from another program.

Stephen Hansen me+list/python at ixokai.io
Thu Jun 17 17:36:56 EDT 2010


On 6/17/10 2:09 PM, Laurent Verweijen wrote:
> It just gives me an empty string.
> 
> Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) 
> [GCC 4.4.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from asynchronous import *
>>>> p = Popen(["python", "increment.py"], stdin=PIPE, stdout=PIPE)
>>>> send_all(p, "5\n")
>>>> recv_some(p)
> ''
>>>> send_all(p, "6\n")
>>>> recv_some(p)
> ''

Yes, that's how it signals the same situation. The point is: your
subprocess isn't outputting anything. You sure its not crashing out, for
instance?

-- 

   Stephen Hansen
   ... Also: Ixokai
   ... Mail: me+list/python (AT) ixokai (DOT) io
   ... Blog: http://meh.ixokai.io/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20100617/78effc15/attachment-0001.sig>


More information about the Python-list mailing list