Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Replace subprocess.Popen with psutil.Popen #81

Open
HunterAP23 opened this issue Nov 10, 2024 · 1 comment
Open

[Feature] Replace subprocess.Popen with psutil.Popen #81

HunterAP23 opened this issue Nov 10, 2024 · 1 comment

Comments

@HunterAP23
Copy link

This is more so to gauge interest in this feature. The psutil library is used for finding process information (such as CPU / memory usage) and overall system information. It also provides a wrapper to subprocess.Popen in their own psutil.Popen that makes tracking this information much easier.

I created my own Python class that inherits from ffmpy.FFmpeg where I replaced the process opening method so I can track resource usage, but I was curious if this is something others would want added to this library.

@Ch00k
Copy link
Owner

Ch00k commented Nov 10, 2024

I think this is a good idea. I would, however, instead of replacing subprocess.Popen with psutil.Popen, make psutil an optional dependency, and, if it is installed, use psutil.Popen instead of subprocess.Popen. This way we'd keep backwards compatibility, and keep the package dependency-free by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants