===
commandPort: 
http://download.autodesk.com/global/docs/maya2012/en_us/CommandsPython/index.html

name(n)
Specifies the name of the command port which this command creates.
CommandPort names of the form name create a UNIX domain socket on the
localhost corresponding to name. If name does not begin with "/", then
/tmp/name is used. If name begins with "/", name denotes the full path
to the socket. Names of the form :port number create an INET domain on
the local host at the given port
===

It only opens a local port, so you must access it via "localhost" or
"127.0.0.1". It is not exporting to the ip 192.168.1.2



On Sat, Oct 13, 2012 at 11:34 AM, Nick Burkard <mercurygho...@gmail.com> wrote:
>
> Don't use commandPort, use a listener python socket script in your maya or 
> batch session to listen and just exec() the strings your sending.
>
> On Oct 13, 2012, at 10:33 AM, Ali Khanbabaei <ali.kh....@gmail.com> wrote:
>
> hi guys.
> when i run this script ,i get this error : ocket.error: [Errno 10061] No 
> connection could be made because the target machine actively refused it
> what i should to do?
>
> import socket
> HOST ="192.168.1.2" #destination IP
> PORT =7000
> ADDR=(HOST,PORT)
> client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
> client.connect(ADDR)
> MyMessage = 'polyCube()'
> client.send(MyMessage)
> data = client.recv(1024)
> client.close()
> print 'The Result is %s'%data
> ///////////////////////////////
> explain:
> -os : 7
> -pyVer :2.6
> -mayaVer:2013
> -firewall in client and server is off
> -run commandPort -n ":7000" in client
>
> --
> 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

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to