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


Groups > comp.lang.python > #104230

Re: importing

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Tony van der Hoff <tony@vanderhoff.org>
Newsgroups comp.lang.python
Subject Re: importing
Date Mon, 7 Mar 2016 17:23:41 +0000
Lines 21
Message-ID <mailman.31.1457371425.10335.python-list@python.org> (permalink)
References <56DDA44B.7040405@vanderhoff.org> <CAPTjJmpAaefgSA+YKm45A4ucuEgjPgL+XmugS22oFB_1ZccGxQ@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 5hLuX1BzBan2In9nPRJyoAkBE1x9pv+I8kZ7ngnAKBuw==
Return-Path <tony@vanderhoff.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.066
X-Spam-Evidence '*H*': 0.87; '*S*': 0.00; 'replied': 0.09; 'package,': 0.13; 'help;': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'url:html)': 0.16; 'wrote:': 0.16; 'tkinter': 0.22; 'cheers,': 0.22; 'import': 0.24; 'header:In- Reply-To:1': 0.24; 'sort': 0.25; 'module': 0.25; 'header:User- Agent:1': 0.26; "doesn't": 0.26; 'van': 0.26; 'chris': 0.26; 'module.': 0.27; 'work.': 0.30; 'certainly': 0.30; 'guess': 0.31; 'supposed': 0.31; 'url:python': 0.33; 'case,': 0.34; 'recommended': 0.34; 'something': 0.35; 'should': 0.36; 'url:org': 0.36; 'url:library': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'thanks': 0.37; 'received:localdomain': 0.38; 'received:192': 0.39; 'to:addr:python.org': 0.40; 'url:3': 0.60; 'charset:windows-1252': 0.62; 'more': 0.63; 'detail.': 0.66; 'from:addr:tony': 0.84; 'url:tkinter': 0.84; 'received:192.168.1.7': 0.91
X-Virus-Scanned Debian amavisd-new at mail.vanderhoff.org
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0
In-Reply-To <CAPTjJmpAaefgSA+YKm45A4ucuEgjPgL+XmugS22oFB_1ZccGxQ@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:104230

Show key headers only | View raw


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.

However, more generally, how am I supposed to know that a module is part 
of a package, and needs a "magic" stanza to get a module loaded?

Cheers,
-- 
Tony van der Hoff        | mailto:tony@vanderhoff.org
Buckinghamshire, England |

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


Thread

Re: importing Tony van der Hoff <tony@vanderhoff.org> - 2016-03-07 17:23 +0000

csiph-web