[Tutor] Passing count from one function to another

Deirdre Hackett Deirdre Hackett" <deirdrehac@lycos.co.uk
Mon Feb 24 11:30:28 2003


class Application(Frame):

            def move(self,x,y,z):
                    ................

            def graph(self,x,y,z):
                    ..................
                    ..................
                    if (count==20):
                        count = 0
                        self.move()


            def start_input(self):
                    ..................
                    ..................

                    self.take_reading()

            def take_reading(self):

                    ..................
                    ..................
                    self.reading(reading[0], reading[1], reading[2])
                    t = Timer(0, self.take_reading)
                    t.start()


This is basically the skeleton of the program. I want to initialise a count
and count how many times take reading is called and then when graph is
called the count value is also passed to it and then when count is equal to
20 then move is called.
I know this is probably a very basic "programming" problem.
I don't think i have defined it very clearly but would greatly appreciate
any help as I am so close to wrapping this whole thing up.
Thanks
Deirdre