a methodology question:
I have a "main" python script which runs on an infinite loop on my system, and I want to send information to it (a json data string for example) occasionally with some other python scripts that will be started later by myself or another program and will end just after sending the string.
I can't use subprocess here because my main script doesn't know when the other will run and what code they will execute.
I'm thinking of making the main script listen on a local port and making the other scripts send it the strings on that port, but is there a better way to do it ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…