I added a sys.platform == "darwin" case to both scripts, and on osx 10.6.8 with maya 2012 this seems to work fine and repeatedly when I just use the wingHotKeys module from a terminal (I dont use wing).
I'm curious why the scripts go through so much trouble to set up raw low level sockets on a platform specific basis. The python telnetlib works beautifully with very little setup and I would think the underlying code would handle platform specific issues: from telnetlib import Telnet telnet = Telnet() # I have a mel port on 7001 and a python port w/ pickle on 7002 # Leaving the host empty will connect on localhost automatically telnet.open("", "7002") telnet.write("cmds.ls()") result = telnet.read_very_eager() telnet.close() Those scripts aren't really the cleanest or most efficient. For instance, in the executeWingCode module, there is no reason to open the temp file twice. The whole thing could be cleaned up I am sure. So I am not really certain where your problem is, as it does work fine for me. On Wed, Apr 25, 2012 at 9:07 AM, oglop <ogl...@gmail.com> wrote: > hi all > i read Eric Pavey's wingide and maya working together tutorial here > <http://mayamel.tiddlyspot.com/#[[How%20can%20I%20have%20Wing%20send%20Python%20or%20mel%20code%20to%20Maya%3F]]>, > and used > > executeWingCode.py <http://pastebin.ubuntu.com/945883/> and wingHotkeys.py > <http://pastebin.ubuntu.com/945884/> > from here <http://www.eksod.com/2011/07/wing-ide-with-maya-on-linux/> > > it works perfectly fine in maya 2010, but in 2011 / 2012 / 2013 it doesn't > work. > if i use > mSocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > it works for the first time, but won't be able to send python commands to > maya from second time on ? > what should i change to make it work in newer versions of maya ? thanks. > > in office, the same setup works fine though, ( office environment is centos 4 > + maya 2011 ) > thanks! > > -- > 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