From: Jonathan B. <jbr...@ea...> - 2003-09-16 22:38:55
|
On Tue, 2003-09-16 at 17:57, Richard Chapman wrote: > hi > > okay i have a file called pp.py that has a class def in it > > class _test: > > def __init__(self): > self.arrow1 = arrow(... > self.arrow2 = arrow(... > > def move(self, step): > self.arrow1.pos.x = self.arrow1.pos.x + step > self.arrow2.pos.x = self.arrow2.pos.x + step > > > now back in another file in the same directory i have > > import pp > > #now i create instances of the class like this > s1 = pp._test > s2 = pp._test > > > #now i have a while loop > while 1==1: > s1.move(step=-2) > s2.move(step=2) > > now the problem i am having is that it is only showing s2's arrows, throwing > in some print statements in between sections of code sometimes i can get it > so that s1 arrows you see for a momentum, like flickering but a mostly not > displayed. like 10 seconds you dont see s1 and then for a second you do > where as s2 you see all the time, it seems almost as if s1 and s2 are > sharing the same arrows. > > How do i stop this from happening, how do i get s1 and s2 to be displayed > together/ solid not flicker how it does. what am i doing wrong. > > > Thank you for any help > > rich > Can you flesh this out to make a complete, reproducible example? This one has syntax errors such that it is not completely clear what you are trying to demonstrate. -Jonathan Brandmeyer |