from __future__ import with_statement import gevent from util import alarm alarm(1) with gevent.Timeout(0.01, False): while True: gevent.sleep(0)
import sys from gevent.subprocess import Popen from util import alarm alarm(3) popen = Popen([sys.executable, '-c', 'pass']) while popen.poll() is None: pass
import gevent from util import alarm alarm(1) with gevent.Timeout(0.01, False): while True: gevent.sleep(0)