Skip to main content

Python subprocess wrapper using os.wait4 to get resource usage

Project description

subprocess4

Python subprocess wrapper using os.wait4() to get resource usage. Requires Python 3.8+ and POSIX.

import subprocess4

result = subprocess4.run(['ls', '-l'], capture_output=True)
print(result.rusage.ru_utime)  # User CPU time

returncode, rusage = subprocess4.call4(['python', '--version'])
proc = subprocess4.Popen(['cmd'])
returncode, rusage = proc.wait4()

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

subprocess4-0.1.0.tar.gz (24.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

subprocess4-0.1.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file subprocess4-0.1.0.tar.gz.

File metadata

  • Download URL: subprocess4-0.1.0.tar.gz
  • Upload date:
  • Size: 24.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for subprocess4-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1d3a296213509a53d45c7ffff1f5aaec572ce71761783bec18a1bb585caf10de
MD5 f8ca1d0bcaf54e662f5a45a3adea1835
BLAKE2b-256 9b700b9d655037ed3db2bb2075d1167d6199a9905a99abf647ebc8bcd37b7ebe

See more details on using hashes here.

File details

Details for the file subprocess4-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: subprocess4-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for subprocess4-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2d083b7b990039243eb5eb108deb09847e6c89783cf9efc374d1746dc8fa9ccf
MD5 3d2158c2eab09264377834282cf2066d
BLAKE2b-256 a178a811f420c1db46f0f1777ef6323e58bb171cf0f4c538e61e9d5282f021ba

See more details on using hashes here.

Supported by

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