<div>Hi all,</div>
<div> </div>
<div>I am not sure how this works, but am composing my query here.</div>
<div> </div>
<div>I am trying to expect the below snippet using telnetlib.</div>
<div> </div>
<div>#################</div>
<div>bash# install</div>
<div>blah blah blah</div>
<div>do you want to continue [y/n]? y</div>
<div>blah blah blah</div>
<div>
<div>blah blah blah</div>
<div>blah blah blah</div>blah blah blah</div>
<div>Installation complete</div>
<div>bash#</div>
<div>##################</div>
<div> </div>
<div>For the above, i am doing</div>
<div>t.read_until("bash#")</div>
<div>t.write("install\n")</div>
<div>t.read_until("n]? ")</div>
<div>t.write("y\n")</div>
<div>t.read_until("bash#")</div>
<div>t.write('exit\n")</div>
<div> </div>
<div>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.</div>
<div>Is there some way i can read whats happening behind the scenes until it hits the read_until?</div>
<div> </div>
<div>Thanks for the help</div>
<div>-- <br>Vinay </div>