This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author noam
Recipients noam
Date 2010-03-03.08:17:32
SpamBayes Score 3.0837996e-06
Marked as misclassified No
Message-id <1267604255.42.0.0975325931502.issue8048@psf.upfronthosting.co.za>
In-reply-to
Content
Hello,

This bug is the cause of a bug reported about DreamPie: https://bugs.launchpad.net/bugs/530969

DreamPie (http://dreampie.sourceforge.net) changes sys.displayhook so that values will be sent to the parent process instead of being printed in stdout. This causes doctest to fail when run from DreamPie, because it implicitly assumes that sys.displayhook writes the values it gets to sys.stdout. This is why doctest replaces sys.stdout with its own file-like object, which is ready to receive the printed values.

The solution is simply to replace sys.displayhook with a function that will do the expected thing, just like sys.stdout is replaced. The patch I attach does exactly this.

Thanks,
Noam
History
Date User Action Args
2010-03-03 08:17:36noamsetrecipients: + noam
2010-03-03 08:17:35noamsetmessageid: <1267604255.42.0.0975325931502.issue8048@psf.upfronthosting.co.za>
2010-03-03 08:17:34noamlinkissue8048 messages
2010-03-03 08:17:33noamcreate