Python Forum

Full Version: Please help me. about self.expect()
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
this 2 line code
====
self.expect('Hit any key to stop autoboot:', timeout=timeout)
self.send("\n")

===================================
works on old PC with WIN 7. Vmware Ubumtun 10.10
===================================
The actual log as
=======================
xxx MPC5200 SBC #12345678

Hit any key to stop autoboot: 0
SBC2>
=======================
it stay 1 sec. for
Hit any key to stop autoboot:

when I use this same code at new PC, WIN 10, Oracle virtual box linux
it can not stop at
SBC2>
look like it can not detect
Hit any key to stop autoboot:
====================
I have try many commands , but they are not working.
self.expect('Hit any key to stop autoboot', timeout=timeout)
self.expect('Hit any key to stop autoboot:\S', timeout=timeout)
self.expect('Hit any key to stop autoboot:\s', timeout=timeout)
self.expect('Hit any key to stop', timeout=timeout)
self.expect('^Hit', timeout=timeout)

Please let me know what should I try.
Thanks