On Wed, 27 Jun 2012 19:15:54 -0700, woooee wrote:
> "as vars() has not been declared and it does not appear to be valid
> Python syntax"
>
> You assume too much IMHO. Vars() was not declared in the code provided
> and I do not think that we should be assuming that it is a function
> returning a
On Jun 27, 5:21 pm, iconoclast011 wrote:
> Fairly new to Python ... Is there a way to efficiently (different from my
> brute
> force code shown below) to set up a game grid of buttons (ie with pygame)
> responding to mouse clicks ? I would want to vary the size of the grid ...
>
> Thanks
>
> Br
On Wed, 27 Jun 2012 19:43:07 -0700 (PDT), alex23
wrote:
>There are two ways to help people: by trying to understand what
>they're doing, or by submitting them to endless pedantry. Only one of
>those is actually helpful.
Is it alright if I use that as a quote? Properly attributed, of
course.
--
In reply to "alex23" who wrote the following:
> On Jun 28, 12:15=A0pm, woo...@gmail.com wrote:
> > You assume too much IMHO. =A0Vars() was not declared in
> > the code provided and I do not think that we should be
> > assuming that it is a function returning a dictionary instead
> > of an error.
>
On Jun 28, 12:15 pm, woo...@gmail.com wrote:
> You assume too much IMHO. Vars() was not declared in
> the code provided and I do not think that we should be
> assuming that it is a function returning a dictionary instead
> of an error.
http://docs.python.org/library/functions.html#vars
Do you ha
On Wednesday, June 27, 2012 5:15:09 PM UTC-7, Steven D'Aprano wrote:
> On Wed, 27 Jun 2012 16:24:30 -0700, David wrote:
>
> > First, you should be getting an error on
> > vars()[var] = Button(f3, text = "00", bg = "white")
> > as vars() has not been declared
>
> The Fine Manual says differently:
On Jun 28, 8:21 am, iconoclast011 wrote:
> Fairly new to Python ... Is there a way to efficiently (different from my
> brute
> force code shown below) to set up a game grid of buttons (ie with pygame)
> responding to mouse clicks ? I would want to vary the size of the grid ...
It hasn't been u
On Wed, 27 Jun 2012 16:24:30 -0700, David wrote:
> First, you should be getting an error on
> vars()[var] = Button(f3, text = "00", bg = "white")
> as vars() has not been declared
The Fine Manual says differently:
Python 2:
http://docs.python.org/library/functions.html#vars
Python 3:
http://do
On 27/06/2012 23:21, iconoclast011 wrote:
Fairly new to Python ... Is there a way to efficiently (different from my brute
force code shown below) to set up a game grid of buttons (ie with pygame)
responding to mouse clicks ? I would want to vary the size of the grid ...
[code snipped]
Someth
On Thu, Jun 28, 2012 at 9:35 AM, Chris Angelico wrote:
> On Thu, Jun 28, 2012 at 9:24 AM, David wrote:
>> First, you should be getting an error on
>> vars()[var] = Button(f3, text = "00", bg = "white")
>> as vars() has not been declared and it does not appear to be valid Python
>> syntax.
>
> It
On Thu, Jun 28, 2012 at 9:24 AM, David wrote:
> First, you should be getting an error on
> vars()[var] = Button(f3, text = "00", bg = "white")
> as vars() has not been declared and it does not appear to be valid Python
> syntax.
It's valid syntax, but highly inadvisable. What it does is call the
First, you should be getting an error on
vars()[var] = Button(f3, text = "00", bg = "white")
as vars() has not been declared and it does not appear to be valid Python
syntax. I don't see a reason to store a reference to the button since you
won't be modifying them. Also, you can not mix pack()
Fairly new to Python ... Is there a way to efficiently (different from my brute
force code shown below) to set up a game grid of buttons (ie with pygame)
responding to mouse clicks ? I would want to vary the size of the grid ...
Thanks
Brute force code:
from Tkinter import *
root = T
13 matches
Mail list logo