Disable stderr from external library
问题 I need to disable sys.stderr messages, which produced by some *.jar file. This *.jar file is calling by subprocess.check_call(cmd) from sklear2pmml method __init__.py of external library ( sklear2pmml library). I know, that I can disable stderr by changing library code to something like this: fnull = open(os.devnull,'w') subprocess.check_call(cmd,stderr=fnull) But this treak leads to changing python library, that I don't want. How can I fix stderr output without this side effect? 回答1: One