<div dir="ltr"><div class="gmail_default" style="color:#000000"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 4, 2013 at 1:30 PM, Rotwang <span dir="ltr"><<a href="mailto:sg552@hotmail.co.uk" target="_blank">sg552@hotmail.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 04/04/2013 14:49, Jason Swails wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I've added some comments about the code in question as well...<br>
<br>
On Wed, Apr 3, 2013 at 11:45 PM, <<a href="mailto:teslafrequency@aol.com" target="_blank">teslafrequency@aol.com</a><br>
<mailto:<a href="mailto:teslafrequency@aol.com" target="_blank">teslafrequency@aol.com</a><u></u>>> wrote:<br>
<br>
    Hi, I am working with Tkinter, and I have set up some simple code to<br>
    run:<br>
<br>
    import tkinter<br>
    import re<br>
    from tkinter import *<br>
<br>
<br>
If you import everything from tkinter into your top-level namespace,<br>
then the "import tkinter" at the top serves no purpose.<br>
</blockquote>
<br>
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.</blockquote>
<div><span style="color:rgb(0,0,0)"><br></span></div><div><span style="color:rgb(0,0,0)"><div style="color:rgb(0,0,0);display:inline" class="gmail_default">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.</div>
</span></div><div><span style="color:rgb(0,0,0)"><div style="color:rgb(0,0,0);display:inline" class="gmail_default"><br></div></span></div><div><span style="color:rgb(0,0,0)"><div style="color:rgb(0,0,0);display:inline" class="gmail_default">
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 :).</div></span><br>
</div><div><span style="color:rgb(0,0,0)"><div style="color:rgb(0,0,0);display:inline" class="gmail_default"><br></div></span></div><div><span style="color:rgb(0,0,0)"><div style="color:rgb(0,0,0);display:inline" class="gmail_default">
All the best,<br>Jason</div></span></div></div></div></div>