I've been playing with this a bit, and it doesn't work very well.

Popen() opens KiXtart and can pipe stuff into GetS, but there is no way of detaching, and it doesn't handle the pipe closeing very well.

What I really need is:
1) A switch for KiX32.exe which will cause it to read the script from stdin rather than a file.
2) When stdin closes, reattach to the tty or console device so that Get and GetS will work.