From 56a016820927d7ee689e22f6b631db77322ed536 Mon Sep 17 00:00:00 2001 From: Per Cederqvist <ceder@lysator.liu.se> Date: Fri, 24 Oct 2003 16:54:53 +0000 Subject: [PATCH] Added support for collecting stderr of a spawned program via a pipe. --- ChangeLog | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ChangeLog b/ChangeLog index 88aa063..249b0b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,23 @@ 2003-10-24 Per Cederqvist <ceder@ceder.dyndns.org> + Added support for collecting stderr of a spawned program via a + pipe. + * pcl_expect/spawn.py (_spawn): New helper function, extracted + from Spawn.__init__. New argument: use_stderr_pipe. + (Spawn.__init__): New optional argument: use_stderr_pipe. Set the + stderr attribute to an Expectable object that represents the + stderr output from the subprocess it it is true. Get rid of the + __pty attribute, and renamed __child to __child_pid. + (Spawn.send): Use self.fileno() instead of self.__pty. + (Spawn.close): Ditto. Close the stderr pipe if present. + (spawn2): New function. A possibly easier API if you want to + have the stderr output in a separate Expectable. + * demo/stdout.py: New demo program. Run a subshell in a pty. + * demo/stderr.py: New demo program. Run a subshell in a pty, but + with stderr connected to a pipe. + * README: Mention that pcl-expect can collect stderr of a spawned + program via a pipe. + Added TCP support. * README: TCP support is now implemented. * pcl_expect/tcp.py: New file. -- GitLab