[Tutor] Shorten Code
o0MB0o at hotmail.se
Tue Nov 22 20:41:19 CET 2011
> Button1 is supposed to represent chair one in the train.
>So call it chair_1 or put it in a list called chairs
>so that you can access them as chairs or whatever.
>But get a name that reflects what its actually used for.
Yes, perhaps that is a good way to go. I didn't think about that.
> at the top of my email, I am writing a larger program. This program is
> supposed to be a GUI online booking program for train tickets.
>OK, That's a pity.
>A Tkinter program is never going to be an online GUI, it only works on
>And its all a lot more messy.
No, I didn't mean that it have to work online. It is just fine if it works
on the desktop.
I can only imagine how much more complicated things would be then. But if I
understood it correctly,
with the help and information I got from you in this mail and in your
previous mail, I can manage to
solve my problems? It is a bit hard right now to understand, because I am
unfamiliar with using tuples/lists
and data tables. I will do my best to get it to work.
>> However, I understand if you don't have time to answer these probably
>> stupid and simple questions, I am still grateful for your previous
>They are neither simple nor stupid, they are very sensible questions and
>you are tackling a significant program. Sadly I don't think your
>approach will work for an 0nline solution (ie a web based one).
I just got my program to work today, but I want to shorten the code
using your suggestions in this and your previous email. I still find this
to do because that way of thinking is completely new to me. I have one of
below for each chair. I just want to use one instead of so many functions.
That is why I am trying to understand and
implement your suggestions.
"""This method runs if chair one is clicked"""
More information about the Tutor