Path: csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:not': 0.03; 'importing': 0.05; 'subject:Python': 0.06; 'lines,': 0.07; 'purpose.': 0.07; 'tkinter': 0.07; 'attributes': 0.09; 'imported': 0.09; 'namespace': 0.09; 'toplevel': 0.09; 'cc:addr:python-list': 0.11; 'changes': 0.15; '"from': 0.16; '(it': 0.16; 'cc:name:python list': 0.16; 'namespace,': 0.16; 'namespace.': 0.16; 'object)': 0.16; 'run:': 0.16; 'subject:3.3': 0.16; 'subject:Hiding': 0.16; 'subject:Tkinter': 0.16; 'top-level': 0.16; 'applies': 0.16; 'wrote:': 0.18; 'obviously': 0.18; 'wed,': 0.18; 'module': 0.19; 'thu,': 0.19; 'code,': 0.22; 'example': 0.22; 'import': 0.22; 'cc:addr:python.org': 0.22; '(by': 0.24; 'initial': 0.24; 'question': 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'references': 0.26; 'least': 0.26; 'code:': 0.26; 'header:In-Reply-To:1': 0.27; 'said,': 0.30; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'comments': 0.31; 'another': 0.32; "i'd": 0.34; 'case,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'done': 0.36; 'hi,': 0.36; 'jason': 0.38; 'pm,': 0.38; 'does': 0.39; 'simple': 0.61; '11:45': 0.84; ':).': 0.84; 'email addr:aol.com': 0.96; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=hOMRPEuvI0eZwy93FlOhxtiqRbHQmSLwWKzvadBNClU=; b=caPN2/vWRkX9lrmSeYegiKLth3tjJ9ml0wE+R+RJQA0YX92U2lCYyyR0WmnW2KPwW6 cXv4pB2Izs9eNiigr797vDw4ysET1Qk9J9HeeUT/lvpVZbphGEU/n6yCm2SIjQ6zBbBL tnv80AyCuwr/lkkUOzTS/Nx2Jwk9IvHSpcyMg+VcNGC2aD2/Zf5C0IFWIlAbjBkWAGcB fy/MVfFplMn2opRnUQPUTNO2Hh36FGUpfReM6oYatFnXHMsca26CxsFxyUGn/IUXMM0P hsZNXlcaRIWs8ao6gWh0hPKdchnrEY7VImzadxKnWDcbREP+R9p6q/vrTeq7AcyRmDBn nOQw== MIME-Version: 1.0 X-Received: by 10.42.50.202 with SMTP id b10mr3908669icg.7.1365102046990; Thu, 04 Apr 2013 12:00:46 -0700 (PDT) In-Reply-To: References: Date: Thu, 4 Apr 2013 15:00:46 -0400 Subject: Re: Python 3.3 Tkinter Fullscreen - Taskbar not Hiding From: Jason Swails To: Rotwang Content-Type: multipart/alternative; boundary=90e6ba61453a97e03e04d98d96e7 Cc: python list X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 105 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1365102055 news.xs4all.nl 6932 [2001:888:2000:d::a6]:41552 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:42772 --90e6ba61453a97e03e04d98d96e7 Content-Type: text/plain; charset=ISO-8859-1 On Thu, Apr 4, 2013 at 1:30 PM, Rotwang wrote: > On 04/04/2013 14:49, Jason Swails wrote: > >> I've added some comments about the code in question as well... >> >> On Wed, Apr 3, 2013 at 11:45 PM, > > wrote: >> >> Hi, I am working with Tkinter, and I have set up some simple code to >> run: >> >> import tkinter >> import re >> from tkinter import * >> >> >> If you import everything from tkinter into your top-level namespace, >> then the "import tkinter" at the top serves no purpose. >> > > I don't know whether this applies to the OP's code, but I can think of at > least one reason why one would want both "import module" and "from module > import*" at the top of one's code: monkey patching. That was not happening in the OP's code (it actually had no references to tkinter after the initial import). That said, if you change any attributes inside tkinter (by binding names inside tkinter to another object) after the top three lines, those changes will not percolate down to the attributes imported via "from tkinter import *" -- you would obviously have to do that work before importing the tkinter namespace into the toplevel namespace. I'd be interested to see if there's actually an example where someone does this in a way that would not be done better another way. In any case, it served no purpose in this particular program :). All the best, Jason --90e6ba61453a97e03e04d98d96e7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

<= /div>

On Thu, Apr = 4, 2013 at 1:30 PM, Rotwang <sg552@hotmail.co.uk> wrote:
On 04/04/2013 14:49, Jason Swails wrote:
I've added some comments about the code in question as well...

On Wed, Apr 3, 2013 at 11:45 PM, <teslafrequency@aol.com
<mailto:tesl= afrequency@aol.com>> wrote:

=A0 =A0 Hi, I am working with Tkinter, and I have set up some simple code t= o
=A0 =A0 run:

=A0 =A0 import tkinter
=A0 =A0 import re
=A0 =A0 from tkinter import *


If you import everything from tkinter into your top-level namespace,
then the "import tkinter" at the top serves no purpose.

I don't know whether this applies to the OP's code, but I can think= of at least one reason why one would want both "import module" a= nd "from module import*" at the top of one's code: monkey pat= ching.

That was not happening in the OP's code (it actually had = no references to tkinter after the initial import). =A0That said, if you ch= ange any attributes inside tkinter (by binding names inside tkinter to anot= her object) after the top three lines, those changes will not percolate dow= n to the attributes imported via "from tkinter import *" -- you w= ould obviously have to do that work before importing the tkinter namespace = into the toplevel namespace.

=
I'd be interested to see if there's actually an example where someo= ne does this in a way that would not be done better another way. =A0In any = case, it served no purpose in this particular program :).


All the best,
Jason
--90e6ba61453a97e03e04d98d96e7--