[Edu-sig] Tk from IDLE: How to 'Hello World'?

Kirby Urner pdx4d@teleport.com
Fri, 29 Sep 2000 08:28:06 -0700

>any thoughts?
>- Jason

I've been getting advice to check out Boa from the newsgroup side
as well.

I've played with wxpython and the Pythonwin interface and didn't
have any real problems.  I deleted all that stuff when moving up
to 2.0.

I gather I'd need to go back to 1.5.2 to use these GUI tools, or
at least they don't yet work on 2.0 beta.  I've got both 1.5.2 
and 2.0 in my Linux partition, so could test Boa over there if
it's cross-platform (I'm still clumsy/slow in Linux world -- 
took quite awhile to figure out kpackage well enough to get 
2.0/Tk out of the rpms, plus had to go find libreadline.so.3 
or something first (still haven't wired Python 2.0 to an icon
on my Helix Gnome interface)).

Because I'm doing "math through programming" and not really 
focusing on how to build GUI apps, it wasn't high priority for
me to explore Tk.  My modules run directly in IDLE and don't 
depend on any GUI other than IDLE itself to work.  But as I'm 
competing with TI graphing calculators to make Python a CLI 
of choice in the math classroom, I thought a nice little 
popup graphing display in Tk should be part of the package.  

Of course lots of folks have written such (tkgraph, what I was
calling my module, is already out there by someone else), but 
I was taking this opportunity to learn enough Tk myself to pull 
one off.  That's still my agenda.

So that's the background.  To date, IDLE has served all my needs
very well, as my graphics have been out to the Povray rendering
engine or to VRML viewers.

I've long used some of the Microsoft IDEs for bread and butter
programming, including Visual FoxPro's (which is far better than
Access/VBA's when it comes to letting you write your own classes,
including custom subclasses of the provided widgets -- VFP is 
way more powerful than Access overall, dunno why Microsoft 
seems to downplay it).  Dragging and dropping widgets/controls 
from a palette to a form is very easy, then you right click and 
type in various properties -- the usual thing, what the Java IDEs 
aim for as well (same as VC++, Delphi, VB, in terms of generic
look -- but somewhat different from SmallTalk environments).

All of which is to say I know what a fancy IDE is like and see
how much time they save when it comes to developing slick front
ends that don't look out of place on a desktop (not that I'm
strict about that for myself -- that "corporate look" just 
means "boring" a lot of the time).

So if IDLE proves robust enough in 2.0 to accomodate my low 
intensity use of Tk, then I think I'll be satisfied with it 
for my little curriculum niche, which points students on to 
other resources for doing full-fledged GUI apps using Python,
or to other languages/IDEs altogether, such as Java or Xbase.