> I send a command to os.system(cmd) and want to send a break signal in > the same way. Is this possible? The break signal is ctrl c (^c). > I tried this, but it didn't work: os.system('\x03') I think Hex 03 is > the signal for ctrl c.
Its not possible with os.system because os.system runs the called program to completion in a separate process. You would need to mess about with threads and process ids to do it that way. However if you use popen() (or maybe popen2()? )you should be able to send a Ctrl-C character to the process. However whether that actually terminates it will depend on the OS, the process and whether Ctrl-C is being caught anywhere. But at least there's a chance of it working! HTH, Alan G Author of the learn to program web tutor http://www.freenetpages.co.uk/hp/alan.gauld _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor