A timeout wrapper for Python.