Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #104234 > unrolled thread
| Started by | Chris Angelico <rosuav@gmail.com> |
|---|---|
| First post | 2016-03-08 04:38 +1100 |
| Last post | 2016-03-08 04:38 +1100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: importing Chris Angelico <rosuav@gmail.com> - 2016-03-08 04:38 +1100
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2016-03-08 04:38 +1100 |
| Subject | Re: importing |
| Message-ID | <mailman.35.1457372310.10335.python-list@python.org> |
On Tue, Mar 8, 2016 at 4:23 AM, Tony van der Hoff <tony@vanderhoff.org> wrote: > Thanks to all who replied to my cry for help; I understand it better now. > But: > > On 07/03/16 16:08, Chris Angelico wrote: >> >> >> The documentation should tell you what you need to import to make >> something work. In this case, I would guess that "import >> tkinter.messagebox" or "from tkinter import messagebox" would be the >> recommended way to use this module. > > > Well, I found the tkinter documentation to be sparse in the extreme > (https://docs.python.org/release/3.1.3/library/tkinter.html), and it > certainly doesn't go into that sort of detail. You're looking at an ancient version of the docs. Here's the newest docs: https://docs.python.org/3/library/tkinter.html Up the top, it says to start with "import tkinter" or "from tkinter import *", and then it lists some *other modules* (including "tkinter.messagebox"). Obviously with the "turtle" module, you have to import that separately (it's completely outside the tkinter hierarchy); the same is true of the others. Incidentally, this message is visible in the 3.1.3 docs that you linked to, too. But I still recommend reading the current docs (unless you're actually running your code on 3.1.3, in which case you really REALLY should upgrade). ChrisA
Back to top | Article view | comp.lang.python
csiph-web