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.

Source Distribution

TimeoutProcess-0.1.0.zip (2.9 kB view details)

Uploaded Source

File details

Details for the file TimeoutProcess-0.1.0.zip.

File metadata

  • Download URL: TimeoutProcess-0.1.0.zip
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for TimeoutProcess-0.1.0.zip
Algorithm Hash digest
SHA256 0b6ecb7b82aaf1e4e693a1eca53a611c7e7bc264e2f0590834302b126c1f5af9
MD5 4be6f4b6024ff7b39d3d27df7765e3bd
BLAKE2b-256 cbdf8824fce85132f13055e732743930e04b9fa5b5d9f1a42b0cbc30f2f6bc13

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page