Using Pywin32 (obviously not cross platform): import win32api,win32con h=win32api.OpenProcess(win32con.PROCESS_TERMINATE,False, <pid>) win32api.TerminateProcess(h, <exit code>)
Roger "I. Myself" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Suppose we spawn a child process with Popen. I'm thinking of an executable > file, like a compiled C program. > Suppose it is supposed to run for one minute, but it just keeps going and > going. Does Python have any way to kill it? > > This is not hypothetical; I'm doing it now, and it's working pretty well, but > I would like to be able to handle this run-on > condition. I'm using Windows 2000, but I want my program to be portable to > linux. > > Thanks > > Mitchell Timin > > -- > I'm proud of http://ANNEvolve.sourceforge.net. If you want to write software, > or articles, or do testing or research for ANNEvolve, let me know. > > Humans may know that my email address is: (but remove the 3 digit number) > zenguy at shaw666 dot ca > > > ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups ----= East and West-Coast Server Farms - Total Privacy via Encryption =---- -- http://mail.python.org/mailman/listinfo/python-list