One more thing to mention is that Pythonx just added sending messages back to Elixir from Python so now with very little modification you can update your Elixir on the status of whatever is happening in Python. For now you’ll have to use the main branch in GitHub - livebook-dev/pythonx: Python interpreter embedded in Elixir · GitHub and in the future it will be available in pythonx 0.4.8+.
In my example I had to resort to something a little more convoluted to get a similar result which was to wrap the Python code in a genserver and pass its state back and forth which does work and has other advantages but it is more involved.
Many thanks to @polvalente and @jonatanklosko for their work here.


















