On Fri, 2008-08-15 at 10:00 -0700, Carl J. Van Arsdall wrote: > Hey python[], > > I want to create a process that would "expire" if it didn't complete in > a set amount of time. I don't seem to see any timeout values to pass > os.system - does anyone know of a good way to do this? > > So far all I can think of is some kind of watchdog thread - but that > seems like overkill to do such a simple thing. > > > -Carl
Well, if you're on unix, the signal module is probably the easiest method: Python 2.5.2 (r252:60911, Jul 31 2008, 15:38:58) [GCC 4.1.2 (Gentoo 4.1.2 p1.1)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import signal >>> signal.alarm( 1 ) 0 >>> Alarm clock (Interpreter exits) -- John Krukoff <[EMAIL PROTECTED]> Land Title Guarantee Company -- http://mail.python.org/mailman/listinfo/python-list