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",
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,
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
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
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
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) =
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
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:
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
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.
--
10 matches
Mail list logo