From 883310ef5e658fde0e0af2ae5f655f7dae617238 Mon Sep 17 00:00:00 2001 From: Per Cederqvist <ceder@lysator.liu.se> Date: Sat, 25 Oct 2003 21:32:07 +0000 Subject: [PATCH] Documentation added. --- pcl_expect/popen.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pcl_expect/popen.py b/pcl_expect/popen.py index 1cde80d..1e9a1c5 100644 --- a/pcl_expect/popen.py +++ b/pcl_expect/popen.py @@ -1,3 +1,7 @@ +"""Start a process using os.popen, and read input from it. +""" + + import os import pcl_expect @@ -8,9 +12,18 @@ __all__ = [ class Popen(pcl_expect.Expectable): def __init__(self, cmd): + """Run cmd via os.popen.""" self.__cmd = os.popen(cmd, "r") pcl_expect.Expectable.__init__(self, self.__cmd.fileno()) def close(self): + """Close the pipe and wait for the child to die. + + Return the status of the child; see the documentation for + os.popen for information about the return value. + + Note: this will block until the child process dies. + """ + pcl_expect.Expectable.close(self) return self.__cmd.close() -- GitLab