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
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
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
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
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
--
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
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':
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', '