port = XXXimport pymel.core # just to startup mayaimport maya.cmds as cmdscmds.commandPort(n=":%s" % port, sourceType='python')print "socket opened on port %s" % port
import socketport = XXXmayaSock = socket.socket()mayaSock.settimeout(.5)mayaSock.connect(('localhost', port))try:mayaSock.send(r'print "hello from the outside world!\n";')mayaSock.send(r'polyCube();')finally:mayaSock.close()
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAAssL7Z4Y5R6EsNmFra9LkV%2BmmubTYXEnXa6JGaSBXjv8%2Bv_Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3d6xxcob49Fsekpa97Cm9tCU6E8bYmqNyvUB%3DDXKNt2A%40mail.gmail.com.