No module named tkMessageBox in python3.2??

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

No module named tkMessageBox in python3.2??

luofeiyu
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 "<stdin>", line 1, in <module>
ImportError: No module named tkMessageBox

python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from tkMessageBox import askokcancel
>>>
it's ok in python2.7

_______________________________________________
Tkinter-discuss mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/tkinter-discuss
Reply | Threaded
Open this post in threaded view
|

Re: No module named tkMessageBox in python3.2??

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 守株待兔 <[hidden email]>:

> 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 "<stdin>", line 1, in <module>
> ImportError: No module named tkMessageBox
>
> python
> Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
> [GCC 4.5.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from tkMessageBox import askokcancel
>>>>
> it's ok in python2.7
>
> _______________________________________________
> Tkinter-discuss mailing list
> [hidden email]
> http://mail.python.org/mailman/listinfo/tkinter-discuss
>
>
_______________________________________________
Tkinter-discuss mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/tkinter-discuss
Reply | Threaded
Open this post in threaded view
|

Re: No module named tkMessageBox in python3.2??

Firat Ozgul
In reply to this post by luofeiyu
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 守株待兔 <[hidden email]>:

> 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 "<stdin>", line 1, in <module>
> ImportError: No module named tkMessageBox
>
> python
> Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
> [GCC 4.5.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from tkMessageBox import askokcancel
>>>>
> it's ok in python2.7
>
> _______________________________________________
> Tkinter-discuss mailing list
> [hidden email]
> http://mail.python.org/mailman/listinfo/tkinter-discuss
>
>
_______________________________________________
Tkinter-discuss mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/tkinter-discuss