Python stop stdout

f = open('/dev/null', 'w')
sys.stdout = f
Zealous Zebra