Re: [Tkinter-discuss] No module named tkMessageBox in python3.2??

2011-08-21 Thread Firat Ozgul
In my previous message I said: "Also this module is **not** available in tkinter". It should be: "Also this "module is **now** available in tkinter". 2011/8/22 守株待兔 <1248283...@qq.com>: > python3.2 > Python 3.2 (r32:88445, Mar 25 2011, 19:28:28) > [GCC 4.5.2] on linux2 > Type "help", "copyright",

Re: [Tkinter-discuss] No module named tkMessageBox in python3.2??

2011-08-21 Thread Firat Ozgul
tkMessageBox has been renamed to messagebox in Python 3.x. Also this module is not available in tkinter. Therefore: [code] >>> from tkinter import messagebox >>> messagebox.showwarning("hello", "world") [/code] 2011/8/22 守株待兔 <1248283...@qq.com>: > python3.2 > Python 3.2 (r32:88445, Mar 25 2011,

Re: [Tkinter-discuss] lambada difficult to understand

2011-08-21 Thread Firat Ozgul
With lambda your codes will look like this: [code] from Tkinter import * fields = 'Name', 'Job', 'Pay' def fetch(entries): for entry in entries: print 'Input => "%s"' % entry.get() # get text def makeform(root, fields): entries = [] for field in fields: row = Frame(r

[Tkinter-discuss] No module named tkMessageBox in python3.2??

2011-08-21 Thread 守株待兔
python3.2 Python 3.2 (r32:88445, Mar 25 2011, 19:28:28) [GCC 4.5.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from tkMessageBox import askokcancel Traceback (most recent call last): File "", line 1, in ImportError: No module named tkMessageBox python

[Tkinter-discuss] lambada difficult to understand

2011-08-21 Thread 守株待兔
here is a example 9-18.pp3e\gui\tour\entry2.py from the book "programming python(third edition)", i revise it as following,change the "fetch(entries)" to "fetch(event,entries)" ,and add ,event.widget to understand lambda is my goal, there is a question i can't solve,when i click button ,wro

Re: [Tkinter-discuss] what is the meanning of triple?

2011-08-21 Thread Kevin Buchs
It is the tuple of three integers representing the RGB (red,green,blue) intensities making up the chosen color. 255 is maximum, usually, with 32-bit color. The hexstring is another way to write the same set of three values. - Kevin 2011/8/21 守株待兔 <1248283...@qq.com> > in the (triple, hexstr) =

Re: [Tkinter-discuss] what is the meanning of triple?

2011-08-21 Thread Cameron Laird
On Sun, Aug 21, 2011 at 07:22:52PM +, Cameron Laird wrote: > . > . > . > > here is the code: > > from Tkinter import * > > from tkColorChooser import askcolor > > > > def setBgColor(): > > (triple, hexstr) = askcolo

Re: [Tkinter-discuss] what is the meanning of triple?

2011-08-21 Thread Cameron Laird
On Sun, Aug 21, 2011 at 01:57:21PM +0800, 守株待兔 wrote: . . . > here is the code: > from Tkinter import * > from tkColorChooser import askcolor > > def setBgColor(): > (triple, hexstr) = askcolor() > if hexstr:

Re: [Tkinter-discuss] what is the meanning of triple?

2011-08-21 Thread Michael Lange
Hi, oops, I accidentally hit the "Send" button :( > Thus spoketh "守株待兔" <1248283...@qq.com> > unto us on Sun, 21 Aug 2011 13:57:21 +0800: > > > (triple, hexstr) = askcolor() As you have probably noticed the return value of askcolor() is something like: >>> askcolor() ((214, 215, 214), '#d6d7

Re: [Tkinter-discuss] what is the meanning of triple?

2011-08-21 Thread Michael Lange
Thus spoketh "守株待兔" <1248283...@qq.com> unto us on Sun, 21 Aug 2011 13:57:21 +0800: > (triple, hexstr) = askcolor() .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. We Klingons believe as you do -- the sick should die. Only the strong should live. --