clarkwang/sexpect

Implement "interact_out" like in Expect?

clarkwang opened this issue · 2 comments

Issue #19 added interact -re PATTERN but how to get interact_out?

For now, the interact -re PATTERN logic is implemented in client side. Moving it to server side will complicate the server side code quite a lot. And interact must exit with different codes to distinguish between

  1. EOF
  2. ctrl-]
  3. -re PATTERN
  4. Other errors.

Is it ok to be a bit ugly?

$ sexpect interact -re PATTERN -outfile FILE

#19 is moving interact -re PATTERN logic to server side. Then we can reuse expect_out.