Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there autoexpect for pexpect? [closed]

I would like to generate Python Expect (pexpect) code automatically, does something like autoexpect exist for pexpect?

like image 473
Jed Daniels Avatar asked May 27 '10 04:05

Jed Daniels


2 Answers

I have written one:

https://github.com/ianmiell/autopexpect

which works in very basic form. Please contribute if you can!

Use it much the same way as autoexpect:

./autoexpect
[your session]
[exit session]
./script.py

As with autoexpect, you may need to fiddle with the produced script.

like image 63
ianmiell Avatar answered Oct 16 '22 17:10

ianmiell


Not really, AFAIK, but you could use expy AKA expectpy, rather than pexpect, if you depend on autoexpect's functionality. There's nothing conceptually standing in the way of implementing a pyautoexpect -- it's just that, as far as I know, nobody's taken the trouble of doing it (since I've never felt a need for autoexpect myself, I'm not really surprised;-).

like image 24
Alex Martelli Avatar answered Oct 16 '22 19:10

Alex Martelli