Filtering through an external process
Paul Rubin
http
Mon Dec 1 20:35:50 EST 2003
Scott David Daniels <Scott.Daniels at Acm.Org> writes:
> > Anyone know if there's code around to filter text through an external
> > process? Sort of like the Emacs "filter-region" command. For
> Check out popen2 -- its the piece you need.
No, that doesn't do the job. If you popen2 a process and send too
much input without reading the output, the subprocess will block and
your application will hang. That is explained in the docs. Doing it
right is a little bit complicated. You need threads or asynchronous
i/o. That's the functionality that's missing.
More information about the Python-list
mailing list