A Mountain of Perl Books + Python Advocacy

Petri Mikael Kuittinen eye at niksula.hut.fi
Tue May 9 12:09:15 EDT 2000


tsummerfelt1 at myspleenhome.com (tony summerfelt) writes:

> and i think the following is hard to beat in tcl/tk:
> #!/usr/bin/wish
> button .b -text "Exit" -command {exit}
> pack .b
> 
> to fire up a window with a button on it.
> 
> how does python compare for those two programs?

The following is bad Python code, but should do the same as above:

#!/usr/bin/python
from Tkinter import *
root=Tk()
Button(root, text="Exit", command=root.quit).pack()
root.mainloop()

> think i'll actually pick up the `24 hour python book'...i'm pretty sure i'll
> grok it in less though...

I recommend that you first get "Learning Python" or "Quick Python"
and if you already know TCL/TK and want to learn the Python way
to do it get "Python and Tkinter Programming". They are all excellent
books.


/eye

-- 
<(O)> Petri Kuittinen, also known as Eye, Dj Eye or Peku               <(O)>
<(O)> ADDRESS: Timpurinkuja 1 C 39, FIN-02600 Espoo, Finland           <(O)>
<(O)> EMAIL: eye at iki.fi WWW: http://www.iki.fi/~eye/ PHONE: 09-5472380 <(O)>
~You only live once but, if you live right, once is enough.



More information about the Python-list mailing list