[Edu-sig] Just some stuff

Arthur ajsiegel at optonline.net
Sun Jan 23 21:13:54 CET 2005


Some random stuff...

Sean McGrath, who I recommend, recommends 

Online Python for beginners book - A Byte of Python

http://www.byteofpython.info/

I'm blizzarded in.  A good excuse to get stuff done with PyGeo. 

And it happens that the issues I needed to solve were solved with the help
of edu-sig members.

PyGeo has the concept of "levels", whereby layers of a construction can be
revealed or hidden - controlled by Tkinter Checkbuttons. But the fact that
tkinter event commands cannot take arguments had me hemmed in, and rather
than write a separate function for each checkbox (which seemed quite ugly) I
had chosen an inefficient redraw of the entire construction anytime any of
the checkboxes was changed (as the lesser of the evils, until next
refactoring).  We are at next refactoring. 

Scott David Daniels cookbook recipe at 

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52549

led me to a few line solution.  Look mom, I'm currying ;) 

Then...

If I'm going to control povray rendering from the PyGeo interface, I may as
well pull up the rendered image and see what it is I've gotten.  I stay
within tkinter and am content to give control to the image display until it
is closed, so no thread or subprocesses issues anticipated. Sounded simply
enough. Except that I kept pulling up nice pictures of nothing.  

This exchange of Gregor Lingl on tutor-list dug me out.

http://starship.python.net/pipermail/python-de/2002q4/002838.html

Needed a "global" statement.  Sad but true.

Thanks,

Art
  




More information about the Edu-sig mailing list