I am trying to visualize data computed by my program (neural network), by showing images while the program is working, creating a video that shows the progress in real time.
It should be pretty basic, but I'm new to Python, and I'm struggling to find the good framework to do this. It seems that with most libraries (Tkinter, graphics, matplotlib, etc), displaying a video stops the computation, and the user has to interact with the GUI (like close the window) to go back to the program. For now I use PIL.show() to display a single image without stopping the program, but it does not seem suited to video, because I cannot replace the displayed image by another, as the window is not handled by the program anymore.
I'm using Linux Mint and Python 2.7.6
So what is the simplest way to do that ? Is there a library that is well-suited ? Or where can I find an example code doing that ?
Write a multithreading script that runs both, your computation script and a script for the images(where each of them can act as one frame for the video). Keep closing the image window each time the next image is computed. 
This solution is makeshift but will work
Real-time animation in Python