On Wed, Nov 23, 2011 at 2:47 AM, Mic <[email protected]> wrote: > [LOTS OF STUFF SNIPPED] >>> self.chair1.configure(bg="green") >>> os.remove ("Hamburg_Dortmund20_00") > >> And now you delete that file you created without having >> done anything with it? > > The meaning is that when the button is pressed once, it changes color and > creates the file. That means you have > booked the chair. If you click the button once more, the button removes the > file, and changes color to green > which indicates that you have un booked your chair. I hope you understand > now why I delete the file :)
Often if you [name things]/[write code] in terms of WHAT you want to do, rather than HOW you want to do, you will find the going easier For example, a function that is named *bookChair(chairId)*, inside which you change color to green or whatever is worth considering. HTH Asokan Pichai _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
