bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Not a bug; rather a question


From: Mike Gran
Subject: Re: Not a bug; rather a question
Date: Thu, 14 Jan 2016 13:55:10 +0000 (UTC)

On Wednesday, January 13, 2016 5:57 PM, Thomas Dickey <address@hidden> wrote:


>
>
>On Wed, Jan 13, 2016 at 05:45:02PM -0800, Michael Vensky wrote:
>
>> I wanting to get some Python hooks into the ncurses data structures to allow 
>> for an expect/send type of test harness. 
>> 
>> We have a lot of apps that use ncurses.  I want to fire them off then drive
>> them with python and/or nose to support test driven development.
>> 
>> I can make ncurses screens, but I can' really hook into ncurses application
>> screens and read from them so as to be able to answer basic prompts with
>> repli
>> 
>> Any suggestions as to where to start?
>
>hmm - not really.  There are perhaps two ways to test ncurses applications.
>

On a BSD or Linux system, you might just be able to open the /dev/pty of
a terminal running a curses program. Then you could read and write that 

terminal directly.

The output from reading a /dev/pty would be rather complicated to interpret,
since it would be text mixed with escape commands.  You could then pipe that
output through a program like GNU TESEQ to make it easier to interpret.

Haven't tried it, though.

-Mike


reply via email to

[Prev in Thread] Current Thread [Next in Thread]