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.1.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.1-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: subprocess4-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 d477362fe982496a93e3c0461b3300b8eb75d75d2f39170e22f18309cb02ca26
MD5 f922c4417103f2283fecbbf17e654d55
BLAKE2b-256 32ef2b40b380b4f6b17e53916cbf17069e4d6375aae45a2b010a9db51fd844c6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: subprocess4-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 202b02b69509812d9a97c02b1af5536336903f016ac757166b5334a33c48b80a
MD5 f1cac0c3a0af164072f626d6ec50a1bc
BLAKE2b-256 1900bf7806ec5dec7d42a198cb2795e252c4e0b99063d8d3309ba2203e671c49

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