I have a Python program which code contains the following fragment:
def Main():
pid = os.getpid()
print 'Process id: {}'.format(pid)
then, in other part of the code it keeps listening on its STDIN.
This process outputs the following:
Process id: 3824
From another Python process I want to write to the STDIN of the process above given its PID.
My question is: what code I need to do that from the second process?
I'm using Windows.