Oh right. Getting the return value and printing it to the Sublime console
has been asked before. But there are two aspects of the script editor
output. There is the return value for a function call,  and also the output
that Maya just prints to stdout.

Getting the stdout would be a different task altogether because it would
require something on the Maya side to actually send the stdout stream over
a socket to Sublime listening on the other end.

Getting the return value of a function that you call also requires that you
have set your commandPort to use the flag that returns output and also has
a high buffer value. Apparently if Maya tries to send back output larger
than the defined buffer,  it will error.
It might be possible for MayaSublime to poll to receive for a very short
timeout and if nothing comes back then it just gives up. I just remember it
being more trouble than it was worth. I could look into it again though.
On Jun 15, 2014 12:58 AM, "提颖浩" <[email protected]> wrote:

> Hi
> Whenever the Sublime Text executing code, it can display information
> getting the from Maya
> For example: import maya.cmds as mc
>                     selectList = mc.ls (sl = True)
>                     print selectList
> Sublime Text can display the contents of selectList
> thank you
>
> --
> 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/27a29971-282b-460b-b474-a5abda2b221f%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/27a29971-282b-460b-b474-a5abda2b221f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAPGFgA0G1zs4chtb5EBnDwiOHH-LOD%3DZiXi7jWA_W1PH%3D-4h-g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to