Path: csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail From: MRAB Newsgroups: comp.lang.python Subject: Re: importing Date: Mon, 7 Mar 2016 20:07:49 +0000 Lines: 45 Message-ID: References: <56DDA44B.7040405@vanderhoff.org> <56DDB91D.3020006@vanderhoff.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 98UVfpW2IuLtMK576b4WawJc1rb2XOz+oN4j11WLguBA== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'docs.': 0.09; 'grid': 0.09; 'newest': 0.09; 'replied': 0.09; 'separately': 0.09; "(it's": 0.16; '2016': 0.16; '3.1.3': 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'help;': 0.16; 'message- id:@mrabarnett.plus.com': 0.16; 'received:192.168.1.4': 0.16; 'received:84.93': 0.16; 'received:84.93.230': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'url:html)': 0.16; 'wrote:': 0.16; 'obviously': 0.16; 'module,': 0.18; '>>>': 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; '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; 'received:84': 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; 'version': 0.38; 'received:192': 0.39; 'to:addr:python.org': 0.40; 'mark': 0.40; 'still': 0.40; 'some': 0.40; 'url:3': 0.60; 'your': 0.60; 'linked': 0.63; 'to,': 0.63; 'minutes': 0.64; 'mar': 0.65; 'detail.': 0.66; 'chrisa': 0.84; 'url:tkinter': 0.84; 'url:ttk': 0.84; 'notebook': 0.96 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.1 cv=bsGxfxui c=1 sm=1 tr=0 a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=IkcTkHD0fZMA:10 a=GXjHmtdSAAAA:8 a=8AHkEIZyAAAA:8 a=46u59C5AMRTogoYtLTYA:9 a=QEXdDO2ut3YA:10 a=ugmF39v0c8cA:10 a=UaxXAJz_c1cA:10 a=8CeE7XvR2t8A:10 X-AUTH: mrabarnett@:2500 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:104251 On 2016-03-07 19:08, Mark Lawrence wrote: > 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 :( > It's in the tkinter.ttk docs: https://docs.python.org/3/library/tkinter.ttk.html