Jun-16-2019, 05:05 PM
If I try to describe my situation, this will be a longer article :-D
Sometimes it's handy to start a second interpreter with Popen.
In this case I burned already my fingers, because one time he has taken two different Python Interpreters in different environments.
So if you want to start the same interpreter with the same environment, use
you will shoot you in your own foot.
Using the rest like stdin, stdout, stderr is not amazing. It's low level stuff we normally don't want to do by hand.
I have tried one time asyncio and there the handling was much easier, because on network side I had two streams (reader, writer)
and reading from subprocess.stdout was also safer.
Sometimes it's handy to start a second interpreter with Popen.
In this case I burned already my fingers, because one time he has taken two different Python Interpreters in different environments.
So if you want to start the same interpreter with the same environment, use
sys.executable
. Otherwiseyou will shoot you in your own foot.
Using the rest like stdin, stdout, stderr is not amazing. It's low level stuff we normally don't want to do by hand.
I have tried one time asyncio and there the handling was much easier, because on network side I had two streams (reader, writer)
and reading from subprocess.stdout was also safer.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!