Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 1
    +1 mostly agree...eventually might want to re-access original sys.stdout to actually print something. so do this sys_stdout_save = sys.stdout before re-assigning sys.stdout Commented Feb 23, 2010 at 21:55
  • @AJ: of course one would prefer to rewire stdout at an appropriate time. It isn't really clear what the poster wants to achieve anyways IMO. Commented Feb 23, 2010 at 22:01
  • +1 regardless of OP's actual intent, it is useful to know how to "hi-jack" sys.stdout. And yeah, one may want to preserve it to re-instate regular output at a later time but that is trivial. Commented Feb 26, 2010 at 21:30