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

Quiet does not silence functions with subprocess calls #16

Open
TheWizier opened this issue Feb 21, 2023 · 0 comments
Open

Quiet does not silence functions with subprocess calls #16

TheWizier opened this issue Feb 21, 2023 · 0 comments

Comments

@TheWizier
Copy link

TheWizier commented Feb 21, 2023

For instance, apbs_surface with quiet = True does not silence the executable run with subprocess.call.
This can be fixed by using:

import os
import subprocess

retcode = subprocess.call(['echo', 'foo'],
    stdout=subprocess.DEVNULL,
    stderr=subprocess.STDOUT)

ideally the output from the executable should be printed on the current process' stdout so that users can redirect it using redirect_stdout

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

1 participant