Hi Gar,
 
> > > I'm using "Learning Python" by Lutz and Ascher, published by O'Reilly
> > > The example in the book (pg 22), that does not function is;
>
>       >>> from Tkinter import *
>       >>>w = Button(text="hello", command='exit')
>       >>>w.pack()
>       >>>w.mainloop()
>
> > There are two main issues that you will run into using TKinter with
> > ActivePython:
> [...]
> >  2. Tk applications do not work from within the PythonWin environment.
> > Make sure to use "Python Shell" instead.
I've just started with Python myself and, oddly enough, was having trouble with this very example in Lutz and Ascher.
 
I downloaded and installed Tcl/Tk 8.3, modified my Autoexec file and restarted, went into the Python shell, and the book example worked with no hitches.
 
I run Win 98 and had to add the statements below to my Autoexec.bat file (Note that I chose to install Python in C:\Program Files\Python20 instead of the installation default C:\Python20 directory):
set PYTHONPATH=C:\Program Files\Python20\Lib;C:\Program Files\Python20\Lib\lib-tk;C:\Program Files\Python20\DLLs
set TCL_LIBRARY=C:\Program Files\Tcl\lib\tcl8.3
set TK_LIBRARY=C:\Program Files\Tcl\lib\tk8.3
set path=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\Progra~1\Python20;C:\PROGRA~1\TCL\bin
 
 
Fred Hansen
Hendersonville, NC

Reply via email to