Hey all,

I implemented a version of the following into a module (the checkmarked 
answer version):

https://stackoverflow.com/questions/19855288/duplicate-stdout-stderr-in-qtextedit-widget

(the OutputWrapper class and handleOutput method specifcally)

...and it's working in the sense that if I call:

sys.stdout.write('Here's stdout')
sys.stdout.write('Here's stderr')

...I see each in Maya's script editor and my pyqt widget. I've also 
imported logging, set the logging level to INFO, and added a StreamHandler 
for stdout & stderr in my main module. 

What's driving me nuts is that I *only* see output in both the Script 
Editor and my widget if I do explicit sys.std*.write() calls in my module. 
Any imported functions or methods that have logging enabled passing INFO 
level messages or even traceback errors show up *only* in the script editor.

I tried changing the self._stream lines in the stackoverflow example to use 
maya.utils.Output()/ maya.utils.Output(error=1), and even 
sys.__stdout__/sys.__stderr__ directly, but I get the same results (with 
slightly different formatting).

Any ideas to point me in the right direction?

Cheers,

-DW






-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/f0605a26-6467-4eed-998a-dcfa8a31cfdd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to