Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32
bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):import tkinter
tkinter.messagebox
File "<stdin>", line 1, in <module>
AttributeError: module 'tkinter' has no attribute 'messagebox'
<module 'tkinter.messagebox' from '/usr/lib/python3.11/tkinter/messagebox.py'> >>>import tkinter
from tkinter import messagebox
messagebox
Why is this?
import tkinter
tkinter.messagebox
I am trying to learn tkinter.
Several examples on the internet refer to a messagebox class (tkinter.messagebox).
But:
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32
bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):import tkinter
tkinter.messagebox
File "<stdin>", line 1, in <module>
AttributeError: module 'tkinter' has no attribute 'messagebox'
Why is this?
I am trying to learn tkinter.
Several examples on the internet refer to a messagebox class (tkinter.messagebox).
But:
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32
bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):import tkinter
tkinter.messagebox
File "<stdin>", line 1, in <module>
AttributeError: module 'tkinter' has no attribute 'messagebox'
Why is this?
Traceback (most recent call last):import tkinter
tkinter.messagebox
On 2023-05-12, Rob Cliffe via Python-list <python-list@python.org> wrote:
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32
bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):import tkinter
tkinter.messagebox
File "<stdin>", line 1, in <module>
AttributeError: module 'tkinter' has no attribute 'messagebox'
$ python
Python 3.11.3 (main, May 8 2023, 09:00:54) [GCC 12.2.1 20230428] on linux Type "help", "copyright", "credits" or "license" for more information.
<module 'tkinter.messagebox' from '/usr/lib/python3.11/tkinter/messagebox.py'>import tkinter
from tkinter import messagebox
messagebox
Why is this?
Dunno.
<function showinfo at 0x0000021CED0634C0>from tkinter.messagebox import showinfo
<function showinfo at 0x0000021CED0634C0>import tkinter.messagebox
messagebox.showinfo
This works for me. Hope it helps.
from tkinter import messagebox
messagebox.showerror("Hi", f"Hello World")
I am trying to learn tkinter.
Several examples on the internet refer to a messagebox class (tkinter.messagebox).
But:
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32
bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
>>> tkinter.messagebox
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'tkinter' has no attribute 'messagebox'
>>>
Why is this?
<function showinfo at 0x000001994C7F2020>import tkinter.messagebox as mb
mb.showinfo
On 2023-05-12, Rob Cliffe via Python-list <pytho...@python.org> wrote:
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):import tkinter
tkinter.messagebox
File "<stdin>", line 1, in <module>
AttributeError: module 'tkinter' has no attribute 'messagebox'
$ python
Python 3.11.3 (main, May 8 2023, 09:00:54) [GCC 12.2.1 20230428] on linux Type "help", "copyright", "credits" or "license" for more information.
<module 'tkinter.messagebox' from '/usr/lib/python3.11/tkinter/messagebox.py'>import tkinter
from tkinter import messagebox
messagebox
https://budimulia.ac.id/mpo-play/Why is this?
Dunno.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 58:53:20 |
Calls: | 10,397 |
Calls today: | 5 |
Files: | 14,067 |
Messages: | 6,417,461 |
Posted today: | 1 |