Run Python code from external process Is there a way for an external process (e.g. shell command) to cause Blender to execute a fragment of Python code (on Linux)?
Essentially I would like to make my own version of the &quot;Python Console&quot; that runs separately and sends commands to Blender (which is already running and continues to run as normal with commands being received in the background.)
I see two approaches to this.

You can compile entire blender as python module (completely without user interface) and use it inside an external python script.

https://wiki.blender.org/wiki/Building_Blender/Other/BlenderAsPyModule

A custom solution. as described here.

How to remotely run a Python script in an existing Blender instance?