[Python-Dev] [Python-checkins] cpython: removed spurious output (original) (raw)

Nick Coghlan ncoghlan at gmail.com
Tue May 31 07🔞28 CEST 2011


On Mon, May 30, 2011 at 8:25 PM, tarek.ziade <python-checkins at python.org> wrote:

+        oldout = sys.stdout +        sys.stderr = StringIO() +        try: +            dist = self.runsetup('installdist', '--prefix=' + self.rootdir) +        finally: +            sys.sterr = oldout

There's actually a helper for this in test.support:

with support.captured_stderr(): dist = self.run_setup('install_dist', '--prefix=' + self.root_dir)

Cheers, Nick.

-- Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia



More information about the Python-Dev mailing list