Skip to main content

Versatile utility function to run external processes

Project description

ProcRunner

https://img.shields.io/pypi/v/procrunner.svg https://travis-ci.org/DiamondLightSource/python-procrunner.svg?branch=master https://ci.appveyor.com/api/projects/status/jtq4brwri5q18d0u/branch/master Documentation Status Updates

Versatile utility function to run external processes

Features

  • runs an external process and waits for it to finish

  • does not deadlock, no matter the process stdout/stderr output behaviour

  • returns the exit code, stdout, stderr (separately), and the total process runtime as a dictionary

  • process can run in a custom environment, either as a modification of the current environment or in a new environment from scratch

  • stdin can be fed to the process, the returned dictionary contains information how much was read by the process

  • stdout and stderr is printed by default, can be disabled

  • stdout and stderr can be passed to any arbitrary function for live processing

  • optionally enforces a time limit on the process

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.5.0 (2018-04-26)

  • New keyword ‘win32resolve’ which only takes effect on Windows and is enabled by default. This causes procrunner to call the Win32 API FindExecutable() function to try and lookup non-.exe files with the corresponding name. This means .bat/.cmd/etc.. files can now be run without explicitly specifying their extension. Only supported on Python 2.7 and 3.5+.

0.4.0 (2018-04-23)

  • Python 2.7 support on Windows. Python3 not yet supported on Windows.

0.3.0 (2018-04-17)

  • run_process() renamed to run()

  • Python3 compatibility fixes

0.2.0 (2018-03-12)

  • Procrunner is now Python3 3.3-3.6 compatible.

0.1.0 (2018-03-12)

  • First release on PyPI.

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

procrunner-0.5.0.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

procrunner-0.5.0-py2.py3-none-any.whl (7.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file procrunner-0.5.0.tar.gz.

File metadata

  • Download URL: procrunner-0.5.0.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for procrunner-0.5.0.tar.gz
Algorithm Hash digest
SHA256 b01afb837186c94a9d3e3add05b5a0654cff604e030ce0cd469b405441606bc6
MD5 94f897e192f95b79b241e21ec3d52352
BLAKE2b-256 781e09e9d1e5c2666ed9a8bf756a5926481711ea03ea5a3004b149ab59920fae

See more details on using hashes here.

File details

Details for the file procrunner-0.5.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for procrunner-0.5.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5bb32763aa1f88c4813523cef2b7ce9ca53ff79ed0cc911198907732d9a41b8e
MD5 eff55fcef00b35a12ee3b7d23ceaf5d2
BLAKE2b-256 e7348fea0a494276f9fe920df668a4bbc0e5f2153eb06c10d3df06f21cc0e165

See more details on using hashes here.

Supported by

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