gamename schrieb: > Hi, > > I really like this recipe for controlling subprocesses: > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440554 > > However, I can't figure out how I can send the equivalent of "Cntrl-C" > to the subprocess. How can that be done?
import os import signal import subprocess popen = subprocess(...) os.kill(popen.pid, signal.SIGINT) Or with Python 2.6+: popen.send_signal(signal.SIGINT) Christian -- http://mail.python.org/mailman/listinfo/python-list