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.0.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.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d3a296213509a53d45c7ffff1f5aaec572ce71761783bec18a1bb585caf10de
|
|
| MD5 |
f8ca1d0bcaf54e662f5a45a3adea1835
|
|
| BLAKE2b-256 |
9b700b9d655037ed3db2bb2075d1167d6199a9905a99abf647ebc8bcd37b7ebe
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d083b7b990039243eb5eb108deb09847e6c89783cf9efc374d1746dc8fa9ccf
|
|
| MD5 |
3d2158c2eab09264377834282cf2066d
|
|
| BLAKE2b-256 |
a178a811f420c1db46f0f1777ef6323e58bb171cf0f4c538e61e9d5282f021ba
|