Expect Telnet

2007-08-09 Thread Vinay Sagar Prakash
Hi all,

I am not sure how this works, but am composing my query here.

I am trying to expect the below snippet using telnetlib.

#
bash# install
blah blah blah
do you want to continue [y/n]? y
blah blah blah
 blah blah blah
blah blah blah
blah blah blah
Installation complete
bash#
##

For the above, i am doing
t.read_until("bash#")
t.write("install\n")
t.read_until("n]? ")
t.write("y\n")
t.read_until("bash#")
t.write('exit\n")

However, from the time i key 'y/n' till the install script exits, there is a
lot of data that is to be logged. I takes around 1 hour for the whole script
to exit.
Is there some way i can read whats happening behind the scenes until it hits
the read_until?

Thanks for the help
-- 
Vinay
-- 
http://mail.python.org/mailman/listinfo/python-list

buggy popup

2009-10-22 Thread Vinay Sagar Prakash
Hi All,
Need some idea here:
On my windows machine, there is a Java based program that runs all the time.
Every now and then, a popup appears out of this program.

To close this popup, it requires user to Check the Do-not-show-this-popup
check box and then, click on OKAY button.

Is there a python way of automating the above procedure?

Say, I run a python script on my windows machine which waits all the time
and then if the popup appears, the python guy checks the check box and then
hits the OKAY button?

Any modules/ packages that I can refer to? A small hint would be of a big
help.

Thanks,
-- 
Vinay
-- 
http://mail.python.org/mailman/listinfo/python-list