Q:

Simplest way to spawn multiple Python instances in single SSH connection

I have a project based on a Raspberry Pi running the latest release of Raspbian Jessie. 4 separate Python scripts (that contain infinite loops for the operation of multiple stepper motors, other hardware devices and polling of ADCs and input devices) run concurrently in 4 separate SSH connections and communicate data between each other via a simple UDP socket server. 
Everything works perfectly at this point, however, it's not feasible to have 4 separate SSH connections to the machine. Essentially, I'm looking for a way to spawn 4 separate instances of Python that:

Aren't subject to the Global Interpreter Lock
Are able to pass variables to and from one another

Currently the system is based on Python 2.7. I've experimented with Python 3 (for asyncio) to no avail. I have also, unsuccessfully, tried utilising the multiprocessing and threading modules. 
I don't necessarily need another Python script to spawn all 4 instances; a shell script would be just fine. I understand that it may be possible using os.subprocess(shell=True) or something along those lines? 
Thanks,
Adam

A:

Since this seems to be the solution:
You simply have one SSH connection to the machine that calls a single script:
ssh me@raspi "bash ~/caller.sh"

That script will call all of your functions:
#!/usr/bin/env bash
python script1.py &
python script2.py &
python script3.py &
python script4.py &

The & at the end of the line means that the command for that line will be run in the background and bash will not wait for that line to finish before starting the next one. The & on the last command is optional depending on whether you want to be returned to the command prompt immediately or not.
For your comment, writes to stdout are not suppressed; you will see output from all 4 python scripts intermingled based on how far through each script it is. 

