Re: Tkinter __call__

2007-02-17 Thread Gigs_
James Stroud wrote: > Gigs_ wrote: >> James Stroud wrote: >>> Gigs_ wrote: def printit(self, name): print name, 'returns =>', demos[name]() I have tried but cant get it to work properly. I want to instead printit method to put __call__ and call it like that

Re: Tkinter __call__

2007-02-16 Thread James Stroud
Gigs_ wrote: > James Stroud wrote: >> Gigs_ wrote: >>> def printit(self, name): >>> print name, 'returns =>', demos[name]() >>> >>> >>> I have tried but cant get it to work properly. >>> I want to instead printit method to put __call__ and call it like that >>> Can someone help me, plea

Re: Tkinter __call__

2007-02-16 Thread Gigs_
James Stroud wrote: > Gigs_ wrote: >> from Tkinter import * >> from tkFileDialog import askopenfilename >> from tkColorChooser import askcolor >> from tkMessageBox import askquestion, showerror >> from tkSimpleDialog import askfloat >> >> demos = { >> 'Open': askopenfilename, >> 'Color

Re: Tkinter __call__

2007-02-16 Thread James Stroud
Gigs_ wrote: > from Tkinter import * > from tkFileDialog import askopenfilename > from tkColorChooser import askcolor > from tkMessageBox import askquestion, showerror > from tkSimpleDialog import askfloat > > demos = { > 'Open': askopenfilename, > 'Color': askcolor, > 'Query': la

Re: Tkinter __call__

2007-02-16 Thread Peter Otten
Gigs_ wrote: > I have tried but cant get it to work properly. It does work, but not the way you want it to. > I want to instead printit method to put __call__ and call it like that I don't understand. > Can someone help me, please? Try to explain what you want a bit more explicitly. Peter --

Re: Tkinter __call__

2007-02-16 Thread Gigs_
John McMonagle wrote: > Gigs_ wrote: >> from Tkinter import * >> from tkFileDialog import askopenfilename >> from tkColorChooser import askcolor >> from tkMessageBox import askquestion, showerror >> from tkSimpleDialog import askfloat >> >> demos = { >> 'Open': askopenfilename, >> 'C

Re: Tkinter __call__

2007-02-15 Thread John McMonagle
Gigs_ wrote: > from Tkinter import * > from tkFileDialog import askopenfilename > from tkColorChooser import askcolor > from tkMessageBox import askquestion, showerror > from tkSimpleDialog import askfloat > > demos = { > 'Open': askopenfilename, > 'Color': askcolor, > 'Query':

Tkinter __call__

2007-02-15 Thread Gigs_
from Tkinter import * from tkFileDialog import askopenfilename from tkColorChooser import askcolor from tkMessageBox import askquestion, showerror from tkSimpleDialog import askfloat demos = { 'Open': askopenfilename, 'Color': askcolor, 'Query': lambda: askquestion('Warning', '