On Tue, Mar 19, 2013 at 2:58 PM, Stefan Seifert <n...@detonation.org> wrote:

>  Ok, that would not work, since this is just some Perl trickery and
> nothing
> really gets written to any file handle.
> But you can use just the same trick in Python:
>
>
This is probably a question for another list, so feel free to say so.

The example supplied worked exactly. However, when implement the same
technique using the Python library I need I get such as this:

exceptions.AttributeError: 'cStringIO.StringO' object has no attribute
'encoding' at line blah.

Some reading around seems to indicate that this may happen if stdout is
being messed with elsewhere. So I took a look through the code of the
library I'm using and could not find any other stdout redirection occurring.

Any thoughts on what else to look at?

Kind Regards,
Chris

Reply via email to