PiDP-8/I SoftwareForum
Not logged in

simh python expect event loop is backwards

(1) By poetnerd on 2018-09-29 02:49:56

There is one major architectural change needed in the simh python expect setup we have:

Expect is currently happening in the wrong order. The current event loop is:

1. expect a prompt

2. perform an action

3. assume a prompt, or craft one-off parsing of output.

4. goto 1

It should be:

1. perform an action

2. pass in a table of expected outputs

3. proceed conditionally

4. goto 1

Fixing this means sweeping through and changing the order of how events are handled. But it's a really sensible cleanup and will allow much better handling of unexpected output.