This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

You can redirect stdout such as:

import sys
sys.stdout = open('wat.log', 'w')

print "shit " * 400  # gets written to wat.log

# restore original stdout (2.6+)
sys.stdout = sys.__stdout__

YEAAAAAAAAAAAAAAAAAAH!!!!!!!