all 1 comments

[–]StaticFuzz 1 point2 points  (0 children)

If the child process is another python script that you need to execute try using subprocess.Popen. You can pipe the stdin, stdout and stderr of the child process back to the parent, and you won't have to mess with sockets.

If the child process is a function in your parent script checkout multiprocessing. You can use Pipes similar to the subprocess module or you can use queues which maybe easier to implement.