Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

a library to detect if a program is already running

Project description

Knowing if a program is already running can be useful in many situations. For example

  • avoid running operations that do not expect to be executed twice or more simultaneously
  • improve the usability of a software so that the user does not end up having multiple instances of the same program open at once.

All of this in a cross-platform python library .

The library is trivial to use:

import runstatus

if runstatus.already_running('myAppName'):
    print('do something, e.g. exiting')

The library comes with various functions:

  • already_running(codeName) tells you if this same program is running in a different process
  • get_system_start_time() will give you the time when the computer was turned on in unixtime
  • process_exists(pid) will tell you if a process with that id is running
  • process_kill(pid) will kill the process with that id if exists


Either use
pip install runstatus
or download the sources and run
python install

No dependencies are required. Run on python 2.7 or 3.x


The git repository is available at

OS supported

Currently works on Linux, BSD, Windows, Mac OS

Project details

Release history Release notifications

This version
History Node


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
runstatus-1.0.tar.gz (4.0 kB) Copy SHA256 hash SHA256 Source None Sep 19, 2011

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page