From: Jim V. <Jim...@no...> - 2003-09-17 14:06:10
|
To further elaborate on Jonathan's request, for example: s = pp._test does not create an instance of the _test class, but s = pp._test() # note parentheses does -- at least as your example defines this class. Jonathan Brandmeyer wrote: > 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 > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |