Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Mark Lawrence Newsgroups: comp.lang.python Subject: Re: importing Date: Mon, 7 Mar 2016 19:08:47 +0000 Lines: 46 Message-ID: References: <56DDA44B.7040405@vanderhoff.org> <56DDB91D.3020006@vanderhoff.org> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de hW9jEtOh3spDFO+hmvkEkwsfm8jYQuYvccQX+AIvkmPQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.05; 'docs.': 0.09; 'grid': 0.09; 'newest': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'replied': 0.09; 'separately': 0.09; "(it's": 0.16; '2016': 0.16; '3.1.3': 0.16; 'help;': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'url:html)': 0.16; 'wrote:': 0.16; 'obviously': 0.16; 'module,': 0.18; 'language': 0.19; '>>>': 0.20; 'lawrence': 0.22; 'tkinter': 0.22; 'visible': 0.22; 'am,': 0.23; 'import': 0.24; 'header:In- Reply-To:1': 0.24; 'sort': 0.25; 'header:User-Agent:1': 0.26; "doesn't": 0.26; 'header:X-Complaints-To:1': 0.26; 'van': 0.26; 'chris': 0.26; 'skip:" 20': 0.26; 'module.': 0.27; 'ago': 0.29; '(including': 0.30; 'too.': 0.30; 'work.': 0.30; 'code': 0.30; 'certainly': 0.30; 'guess': 0.31; 'says': 0.32; 'language.': 0.32; 'url:python': 0.33; 'case,': 0.34; 'recommended': 0.34; 'tue,': 0.34; 'running': 0.34; 'lists': 0.34; 'something': 0.35; 'but': 0.36; 'should': 0.36; 'url:org': 0.36; 'others.': 0.36; 'url:library': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'thanks': 0.37; 'received:org': 0.37; 'version': 0.38; 'to:addr:python.org': 0.40; 'mark': 0.40; 'still': 0.40; 'some': 0.40; 'url:3': 0.60; 'your': 0.60; 'charset:windows-1252': 0.62; 'linked': 0.63; 'to,': 0.63; 'minutes': 0.64; 'our': 0.64; 'mar': 0.65; 'detail.': 0.66; 'chrisa': 0.84; 'pythonistas,': 0.84; 'url:tkinter': 0.84; 'notebook': 0.96 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: 80.234.129.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:104246 On 07/03/2016 17:38, Chris Angelico wrote: > On Tue, Mar 8, 2016 at 4:23 AM, Tony van der Hoff 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 > As I happen to be playing with tkinter I was searching literally minutes ago for the way to put a grid onto a notebook tab. Regrettably the notebook grid is conspicious by its absence from the docs :( -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence