Showing Image in Juno image pane in real time

You might want to explicitly call display(img) for every few iterations. Sometimes a sleep(0.01) before display(img) helps flush the display panel.