From: quinn at mark.ugcs.caltech.edu (Quinn Dunkan)
Date: 16 Apr 1999 21:28:06 GMT
Subject: pty, qwsv and Python
References: <3717725B.34F2E34A@bogus.bogus.com>
Message-ID: <slrn7hfar8.4er.quinn@mark.ugcs.caltech.edu>
X-UID: 389                                                  

On Fri, 16 Apr 1999 14:24:44 -0300, Henrique Almeida <palpa at bogus.bogus.com>
wrote:
>Warning: NO native speaker ahead.
>
>Hi.
>
>I'm new to Python (only started looking at the docs yesterday). I want
>to know if it is possible to control a qwsv (quake world linux server)
>using Python: ie do a "status" command in the qwsv every 5 minutes,
>process the returned code, watch for some string in the pty...
>
>After searching the Python home page it looks like popen2() is the way
>to go. Is it? Also, is it possible to use "screen" (a program that let
>me "detach" the server) and "popen2" at the same time? I would like have
>a interactive session to qwsv to do administration.
>
>Thanks.

popen2() not going to help with the infamous stdio buffering problem.  What
you want is pyexpect.  Look under System in
www.python.org/download/Contributed.html




