On Aug 27, 5:44 pm, Chris Rebert wrote:
> On Thu, Aug 27, 2009 at 2:37 PM, seanacais wrote:
> > I'm working on a program where I wish to define the default value of a
> > method as a value that was set in __init__. I get a compilation error
> > saying that self is un
I'm working on a program where I wish to define the default value of a
method as a value that was set in __init__. I get a compilation error
saying that self is undefined.
As always a code snippet helps :-)
class foo:
def __init__(self, maxvalue):
self.maxvalue = maxvalue
sel
I want to create a class derived from a Borg class that can
instantiated as part of a script or be contained in other classes.
When methods from the Borg class are called, I would like to know the
name of the class that contains the Borg class.
I've played a bit with inspect and _getframe from th
On May 20, 2:40 am, Peter Otten <[EMAIL PROTECTED]> wrote:
> seanacais wrote:
>
> You have to ensure that the lines
>
> from Tkinter import *
> root = Tk()
>
> are *executed* before the line
>
> dname = dict((d, StringVar()) for d in OPDefaults)
>
> Peter
On May 19, 2:11 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
>
> There's some magic going on behind the scene which means that you have to
> create a Tkinter.Tk instance before you can start churning out StringVars:
>
> >>> import Tkinter as tk
> >>> v = tk.StringVar()
>
> Traceback (most recent call
I'm trying to build an unknown number of repeating gui elements
dynamically so I need to store the variables in a list of
dictionaries. I understand that Scale "variable" name needs to be a
StringVar but I cannot figure out how to initialize the dictionary.
I've tried the following code
ps =