Created
November 27, 2013 05:41
-
-
Save kxxoling/7671172 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
print 'Dive in' | |
saveout = sys.stdout | |
fsock = open('out.log', 'w') | |
sys.stdout = fsock | |
print 'This message will be logged instead of displayed' | |
sys.stdout = saveout | |
fsock.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment