How to make blender listen to a commandport so other apps can send code to it? How to make blender listen to a commandport so other apps can send code to it?
I wanted to ask if there's a simple script or code to tell blender to listen to any code sent by a other app by listening to a commandport simmlar to maya's method.
In maya the only code I need is

import maya.cmds as cmds
cmds.commandPort(name=&quot;:7002&quot;, sourceType=&quot;python&quot;)
cmds.commandPort(name=&quot;:7001&quot;, sourceType=&quot;mel&quot;)

At this point In maya I can send any code with what ever app I want in python by sending it through port 7002, simple and easy.
I want to know if I can do something similar with blender
I tried SublimeBlender but it only worked with sublime when I tried using other apps to send code to port 8006 nothing happens, I need a less complex way to make blender listen to a port to take incoming code from any app not just Sublime.
In short: AFAIK Blender doesn't come with such a feature built-in.

You could start an HTTP server and listen to incoming requests. You'll have to use multithreading (can get hairy) if you don't want to block Blender's UI, though. Another approach could be an asyncio socket server. Also see this SE question: send instructions to blender from external application.

Be sure that you only run this on trusted networks, though, and/or use proper encryption &amp; authentication to protect your Blender.