I am playing about with Jython and Swing, which is a lot of fun.
I've run up against something I saw mentioned before but had no useful response.
for i in xrange(20):
self.y += 1
sleep(0.05)
self.canvas.repaint()
print self.y
this prints 1-20 with a delay of 0.05 seconds as expected but doesn't repaint the canvas until the loop hits 20.
I've seen threading mentioned with Jython and wander if it is to do with this, but can't quite understand as I do want this executed in a synchronous not async fashion.
Can anyone enlighten me at all please?
Thank you very much (use stack overflow constantly, rarely need to ask)