-2

I know that socket is used to communicate with server but can i use socket to communicate with applications ?

I have installed maya software in my Computer.I want to open that maya using Socket.Is it possible to open software using socket in python ?

python_fan
  • 113
  • 2
  • 15
  • 1
    If your "application" is a *server* which listens to a *socket* then yes. It's not really clear what you are trying to ask, or how much you understand of the terms you are using. – tripleee Jan 15 '18 at 06:22

1 Answers1

2

Well before I give a Sample Code. I should warn you. This is not recommended. If you know how to open Maya software through Command Process then you can try something like this.

command = "C:\\ProgramFiles\\Maya\\Maya.exe" #random command
output = subprocess.Popen(command, shell=True, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
if output:
    output=str(output.stdout.read())
    print "Output:",output
    conn.sendall(output)

else:
    error=str(output.stderr.read())
    print "Error:",error
    conn.sendall(error)
Ashuthosh
  • 81
  • 10
  • thanks for response but i want to communicate with maya using socket – python_fan Jan 15 '18 at 06:33
  • 1
    @python_fan Did you read https://stackoverflow.com/questions/30517443/how-do-you-get-maya-to-communicate-through-the-localhost-ip this question – Ashuthosh Jan 15 '18 at 08:30