My first attempt at subclassing....Gahh!

Just just at xs4all.nl
Tue Sep 14 14:23:22 EDT 2004


In article <mailman.3322.1095185945.5135.python-list at python.org>,
 John Lenton <john at grulic.org.ar> wrote:

> On Tue, Sep 14, 2004 at 10:08:25AM +0200, Alex Martelli wrote:
> > Robin Siebler <robin.siebler at palmsource.com> wrote:
> > 
> > > I want to use filecmp.dircmp, but it only prints to the screen, there
> > > is no way to capture the output.  So I thought that I should simply be
> > 
> > Il prints to sys.stdout, which may be the screen or elsewhere, therefore
> > there IS of course a way to capture the output:
> > 
> > import sys, filecmp, cStringIO
> > 
> > save stdout = sys.stdout
> 
> I believe sys.__stdout__ is there for the purpose of not having to
> 'save' sys.stdout in this way.

Nope, it's there so you can get at the original stdout, which is not 
necessarily the same thing...

Just



More information about the Python-list mailing list