I'm using the Python M2Crypto package to generate RSA keys.
>>> import M2Crypto
>>> rsa = M2Crypto.RSA.gen_key (2048, 65537)
.............................................................+++
............................+++
>>>
Notice that "openssl stuff". To suppress writing to stdout/err I usually do:
sys.stdout = open(os.devnull, 'w')
sys.stderr = open(os.devnull, 'w')
That has no effect in this case. I'm assuming this has to do with the way M2Crypto is wrapping OpenSSL.
Is there a way to stop it?