Sry for this stupid question. I am new for python and I am currently using IDLE for python programming. Is there anyway to hide the output generated by the command?
pip.main(['install', 'modulename'])
I was trying to install matplotlib by pip in idle, but then both the speed and idle itself got slower and slower and finally the process became endless. So I was thinking about can I enhance the speed a little bit by hiding the output.
I tried code like this:
import sys
import pip
import io
stdout_real = sys.stdout
sys.stdout = io.StringIO()
try:
pip.main(["install","matplotlib"])
finally:
stdout_real.write(sys.stdout.getvalue())
sys.stdout = stdout_real
The code is from [How to import/open numpy module to IDLE, but unfortunately it did not work.
I also tried to use the -q --quiet flag, but to be honest, I am struggling on how to use the flag for pip in IDLE. I tried code like:
pip.main(['-q'])
and
pip.main(['--quiet'])
None of them work.
Can anyone give some suggestion about this? Or some suggestion about enhancing the download speed?
Thanks so much!