python-shell
python-shell copied to clipboard
Unit test to demonstrate how to handle a multi-message conversation with child process
Spent a very long time wondering why I had to "end()" stdin
to send a message to Python.
Thanks to issue #18 and this StackOverflow answer about flushing Python output, I was able to work it out.
I've now made a JSON knock-knock conversation that (several times) "sends a message, then waits for a reply". You can use this test if you feel like it.