Python Forum
Please help me. about self.expect()
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Please help me. about self.expect()
#1
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Not able to read the text using pexpect/expect Bipinjohnson 7 4,039 Jan-10-2022, 11:21 AM
Last Post: Bipinjohnson
  can I use 2 child.expect at the same time? korenron 0 1,526 May-25-2020, 10:41 AM
Last Post: korenron
  Trying to convert my Expect/bash to Python sumncguy 4 4,035 Jun-07-2019, 07:14 AM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020