Do you mean the script editor? First you should check if you can actually
just catch the output of the commands you are running. If the output is
completely out of your control and you really do want to capture what the
script editor is spitting out, then you can register a callback using the
API...
### code start ###
import maya.OpenMaya as om
def catchOutput(msg, *args):
with open('maya.log', 'a') as f:
f.write("Caught: %s\n" % msg)
# set the callback and save the id
catchOutput_id = om.MCommandMessage.addCommandOutputCallback(catchOutput)
# use the id to remove the callback later
om.MCommandMessage.removeCallback(catchOutput_id)
### code end ###
Obviously you would do something else, rather that just logging it to a
file. Don't do any printing in that callback, as I have noticed it
generates a recursive loop and crashes maya.
On Fri, Mar 2, 2012 at 2:25 AM, Mark Serena <[email protected]> wrote:
> *[Sorry if this is a duplicate didn't see it on the main page a day later]
> *
>
> Hey guys,
>
> Is there a way to extract information from the output window? I want to do
> some graphing/plotting.
>
> Thanks
> Mark
>
> --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>
--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings:
http://groups.google.com/group/python_inside_maya/subscribe