On 22/11/11 19:41, Mic wrote:
A Tkinter program is never going to be an online GUI, it only works on
the desktop. For that you need to use HTML5/Flash/Javascript/Java etc.
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.
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[0] 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
>
>> > > for var in [value,value_1]:
>> > > var = "green"
>>
>> > Um, that won't work. You typed that example too quickly.
>
>
>> Excuse: It was early morning and I hadn't had any coffee...
>
>> In your defense Alan, after you typed that code in your response you
>mentioned
> the necessity o
On Nov 18, 2011, at 13:15, ALAN GAULD wrote:
>
> > > for var in [value,value_1]:
> > >var = "green"
> >
> > Um, that won't work. You typed that example too quickly.
>
> Oops! Yes. You'd need to enumerate and access the variables
> via an index. yuk. Don't do it folks! :-)
>
> Excuse: It w
> > for var in [value,value_1]:
> >var = "green"
>
> Um, that won't work. You typed that example too quickly.
Oops! Yes. You'd need to enumerate and access the variables
via an index. yuk. Don't do it folks! :-)
Excuse: It was early morning and I hadn't had any coffee...
Alan G.
On 11/18/2011 04:01 AM, Alan Gauld wrote:
On 18/11/11 08:16, Mic wrote:
What if I don’t write the same line of code more than once, but I write
similiar lines more than once. Is that okay? Ler
For example:
value="green”
value_1=”green”
If you had a lot of these you could shorten it with a loo
On 18/11/11 08:16, Mic wrote:
What if I don’t write the same line of code more than once, but I write
similiar lines more than once. Is that okay? Ler
For example:
value="green”
value_1=”green”
If you had a lot of these you could shorten it with a loop (BTW the
English term in programming ter
From: Wayne Werner
Sent: Thursday, November 17, 2011 8:30 PM
To: Mic
Cc: tutor@python.org
Subject: Re: [Tutor] Clock in tkinter?
Say that I have a class and I want to make 100 objects.
Then it could look like this:
class Chairs(object):
#Create the objects
chair1=Chair