<html><div style='background-color:'><DIV class=RTE>I am new to Python. I tried to run the following program using IDLE for Python 2.4 and it worked fine:</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE><EM>from Tkinter import *</EM></DIV>
<DIV class=RTE><EM>class GUIFramework(Frame):<BR> """This is the GUI"""<BR> <BR> def __init__(self,master=None):<BR> """Initialize"""<BR> <BR> """Initialize the base class"""<BR> Frame.__init__(self,master)<BR> <BR> """Display the main window"""<BR> self.grid()<BR> <BR> """Create the Text"""<BR> self.HelloLabel = Label(master, text="Hello World!")<BR>
self.HelloLabel.grid()<BR> <BR>if __name__ == "__main__":<BR> guiFrame = GUIFramework()<BR> guiFrame.mainloop()</EM></DIV>
<DIV class=RTE><EM></EM> </DIV>
<DIV class=RTE>When I tried to run this program from the DOS window with the command:</DIV>
<DIV class=RTE>python gui1.py</DIV>
<DIV class=RTE>I received the following error:</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>F:\temp\Python Test Folder>python gui1.py<BR>Traceback (most recent call last):<BR> File "gui1.py", line 1, in ?<BR> from Tkinter import *<BR> File "c:\Program Files\Python24\lib\lib-tk\Tkinter.py", line 2, in ?</DIV>
<DIV class=RTE>AttributeError: 'module' object has no attribute 'Label'</DIV>
<DIV class=RTE>F:\temp\Python Test Folder></DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>Can someone tell me what is wrong?</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>In addition, how can I get the program to run under IDLE and have the main window maximized on display without having to click on the Maximize box myself?</DIV></div><br clear=all><hr> <a href="http://g.msn.com/8HMBENUS/2749??PS=47575" target="_top">Call friends with PC calling -- FREE </a> </html>