Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #104246

Re: importing

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Mark Lawrence <breamoreboy@yahoo.co.uk>
Newsgroups comp.lang.python
Subject Re: importing
Date Mon, 7 Mar 2016 19:08:47 +0000
Lines 46
Message-ID <mailman.42.1457377775.10335.python-list@python.org> (permalink)
References <56DDA44B.7040405@vanderhoff.org> <CAPTjJmpAaefgSA+YKm45A4ucuEgjPgL+XmugS22oFB_1ZccGxQ@mail.gmail.com> <56DDB91D.3020006@vanderhoff.org> <CAPTjJmpA=7aXrBaGYDJLp6opubMOv2HbkOAfO_=yW891aOiAjQ@mail.gmail.com>
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 <python-python-list@m.gmane.org>
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 <CAPTjJmpA=7aXrBaGYDJLp6opubMOv2HbkOAfO_=yW891aOiAjQ@mail.gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.21
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:104246

Show key headers only | View raw


On 07/03/2016 17:38, Chris Angelico wrote:
> 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
>

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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: importing Mark Lawrence <breamoreboy@yahoo.co.uk> - 2016-03-07 19:08 +0000

csiph-web