views:

20

answers:

2

I'm using 20 identical simulators (text base GUI like vi, refreshed quickly), and I need to control them in very similar way. e.g. input some command string to start/stop/config the simulator. The display is important, and I need them to flow on the terminal. Currently I can automatically start each one in a separate terminal.

But after that, I have no idea how to control them automatically. If I spawn the simulator using expect without a terminal, I will not be able to watch the output. Any suggestion on how could I proceed, or what tool could help?

A: 

This is tricky. You might be able to send the exact escape sequences which are generated by your keystrokes to your curses based program and then drive it. I don't know how reliable or easy that will be.

Would it not be possible to create an alternate front end which is scriptable for your simulator and use that for automated tasks like this rather than the CUI interface which is meant for human interaction?

Noufal Ibrahim
Thanks for your suggestion!
Kevin Yu
A: 

Check out my answer to a similar question

Colin Macleod