<div dir="ltr"><div>Hi Florian,</div><div><br></div>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.<div><br></div><div>Some more info here: <a href="http://stackoverflow.com/questions/16557908/getting-output-of-a-process-at-runtime">http://stackoverflow.com/questions/16557908/getting-output-of-a-process-at-runtime</a></div><div><br></div><div>Best,</div><div>Marcus</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 29 October 2014 06:36, Florian Bruhin <span dir="ltr"><<a href="mailto:me@the-compiler.org" target="_blank">me@the-compiler.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I wanted to add some debugging info to debug the issue in my last<br>
mail[1], and I thought maybe it's a good idea to add some sip.dump<br>
output to the debug log before disconnecting the signals; maybe I'll<br>
see something there.<br>
<br>
However it seems sip.dump writes to stdout directly rather than<br>
returning a string. Is there some way I could get the same information<br>
as string, to log to my debug logger, to get that info in a crash<br>
report?<br>
<br>
It seems replacing sys.stdout with a io.StringIO does not work - I<br>
guess sip.dump is not implemented in Python.<br>
<br>
Florian<br>
<br>
[1] <a href="http://www.riverbankcomputing.com/pipermail/pyqt/2014-October/035026.html" target="_blank">http://www.riverbankcomputing.com/pipermail/pyqt/2014-October/035026.html</a><br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
<a href="http://www.the-compiler.org" target="_blank">http://www.the-compiler.org</a> | <a href="mailto:me@the-compiler.org">me@the-compiler.org</a> (Mail/XMPP)<br>
GPG 0xFD55A072 | <a href="http://the-compiler.org/pubkey.asc" target="_blank">http://the-compiler.org/pubkey.asc</a><br>
I love long mails! | <a href="http://email.is-not-s.ms/" target="_blank">http://email.is-not-s.ms/</a><br>
</font></span><br>_______________________________________________<br>
PyQt mailing list <a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><font size="1"><b>Marcus Ottosson</b><br><a href="mailto:konstruktion@gmail.com" target="_blank">konstruktion@gmail.com</a></font><font size="1"><br></font></div>
</div>