I have a GUI to control and analyse the data from the simulation and it's parameters which uses shared memory to manage the state of the simulation and pass the data to the recipients.

It seemed like a good idea to have a simulation restart button to normalise the start position and eventually have more than a single independent simulation. This would require the simulation to run independently of the GUI which up to this point it did not. To implement this I tried running the simulation code in a separate thread having forgotten that Nest is not tread safe and it crashed. The simulation code including Nest currently runs in multiple processes. 

Before attempting to do it myself i asked CoPilot to produce the code attached which I do not understand in detail but this is normal because it uses python features of which I have no knowledge. Up to now. The code runs apart from some 'hopefully simple' details of the button control lost in this conversion

Is this application of interest? 
Is there a standard way to do this?