Skip to main content

Run a process with a timeout attached to it.

Project description

TimeoutProcess provides the ability to run a process with a specified time out. You may find it useful when trying to run a process, which may not terminate in a reasonably obvious fashion. Obvious examples would be typical GUI applications which run till they are explicitly closed.

Typical usage of TimeoutProcess looks like this:

#!/usr/bin/env python

import timeoutprocess

timeoutprocess.TimeoutProcess(['notepad.exe', r'c:\\myfile.txt'], 60)

The first argument to TimeoutProcess take the form of the arguments to subprocess.Popen(), which is a list containing the program name, and any additional arguments.

The second argument is the time, in seconds, to allow the process to run.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for TimeoutProcess, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size TimeoutProcess-0.1.0.zip (2.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page