[Gambas-user] PEEK and managing ssh

Benoît Minisini g4mba5 at gmail.com
Tue Feb 11 17:41:08 CET 2020


Le 11/02/2020 à 02:13, Bruce a écrit :
> 8<
> 
> On 11/2/20 11:32 am, Benoît Minisini wrote:
>> 2) A new class named "Terminal". The name is not very good, it may 
>> change if I find or if someone suggests something better.
>>
>> This class encapsulates a Process object, and provides an Expect() 
>> method that allows to tell what to answer to the process when it 
>> issues a specific prompt.
> 
>> Comments, suggestions and questions are welcome!
> 
> "ProcessIO" "ProcessQA" "ProcIO" "ProcQA"

Beeh... ugly! :-)

> 
> and for the Expect method perhaps "Respond"

I chose "Expect" because it's a name of a "famous" TCL library on unix 
that aims at doing the same thing.

And you are never sure that the running process will actually emit the 
expected prompt. :-)

I'm currently thinking of extending the Process class instead of using a 
new class. The only thing that bothers me is that it will add new 
private fields to the Process class that may be useless to the uses of 
'gb.util'.

-- 
Benoît Minisini


More information about the User mailing list