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
Release history Release notifications | RSS feed
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d477362fe982496a93e3c0461b3300b8eb75d75d2f39170e22f18309cb02ca26
|
|
| MD5 |
f922c4417103f2283fecbbf17e654d55
|
|
| BLAKE2b-256 |
32ef2b40b380b4f6b17e53916cbf17069e4d6375aae45a2b010a9db51fd844c6
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
202b02b69509812d9a97c02b1af5536336903f016ac757166b5334a33c48b80a
|
|
| MD5 |
f1cac0c3a0af164072f626d6ec50a1bc
|
|
| BLAKE2b-256 |
1900bf7806ec5dec7d42a198cb2795e252c4e0b99063d8d3309ba2203e671c49
|