Nathan McBride wrote: > I've used pexpect for a few projects and love it. Basically pexpect > lets you spawn a program and interact with it from code like you > yourself were running it in a console. How would you send the ctrl key?
I don't use pexpect, so I am guessing... The ctrl key by itself is not a character so you can't send that. ctrl-C is a character that is represented in a string as \x03. I expect you would send a control character with sendline(), for example to sent ctrl-C try child.sendline ('\x03') Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor