[PyQt] sip.dump, but getting a string

Marcus Ottosson konstruktion at gmail.com
Wed Oct 29 07:02:58 GMT 2014


Hi Florian,

How about running it via subprocess, pipe stdout and read it from there?
That way, you could let sip.dump print to the console and pick it
regardless of its origins.

Some more info here:
http://stackoverflow.com/questions/16557908/getting-output-of-a-process-at-runtime

Best,
Marcus

On 29 October 2014 06:36, Florian Bruhin <me at the-compiler.org> wrote:

> I wanted to add some debugging info to debug the issue in my last
> mail[1], and I thought maybe it's a good idea to add some sip.dump
> output to the debug log before disconnecting the signals; maybe I'll
> see something there.
>
> However it seems sip.dump writes to stdout directly rather than
> returning a string. Is there some way I could get the same information
> as string, to log to my debug logger, to get that info in a crash
> report?
>
> It seems replacing sys.stdout with a io.StringIO does not work - I
> guess sip.dump is not implemented in Python.
>
> Florian
>
> [1]
> http://www.riverbankcomputing.com/pipermail/pyqt/2014-October/035026.html
>
> --
> http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
>              GPG 0xFD55A072 | http://the-compiler.org/pubkey.asc
>          I love long mails! | http://email.is-not-s.ms/
>
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>



-- 
*Marcus Ottosson*
konstruktion at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20141029/1d466630/attachment.html>


More information about the PyQt mailing list