Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import sys, os, time, pexpect
- try:
- child = pexpect.spawn('microcom -p /dev/ttyUSB0 -s 115200', timeout=10)
- child.logfile = sys.stdout
- child.sendline('start')
- result=child.read().find("starting kernel")
- if result >=0:
- print "success!"
- else:
- print "failed!"
- child.expect('done')
- except:
- print "Error"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement