[Tutor] Re: Python newbie with a couple of questions... :-)

Glen Wheeler wheelege@tsn.cc
Tue, 27 Feb 2001 17:45:14 +1100


(note: I'm sending this to the python list as well so they can help with any
more information...it's like a sea of great people who seem to like helping,
why not take advantage of it?)


  Hi Chris,

  I still have yet to finish that project - I've been very busy lately.
However, I can try to help you with some of your questions.
  A great general resource is the book by John Grayson - Python and Tkinter
Programming.  If your looking for some good Tkinter source code, I'd suggest
looking here - http://www.manning.com/grayson.  That is the website for the
book, and even if you don't have the book you can still d/l the source code
used in the examples.  The ones I have seen are well documented and are a
good example of nice neat python programming.
  I got most of my answers, believe it or not, from a couple of websites on
a programming language called Lisp.  It is very similar to python and I have
heard it is very useful for programming AI - thus it may be helpful for you
to see how it works in lisp then translate that into python.  A good webpage
comparing lisp to python can be found here -
http://www.norvig.com/python-lisp.html.  That link is from Danny Yoo.
  Speaking of Danny, he was also good for inspiration - he gave me some
ideas that although are not what I'm using now, were good to get me thinking
the right way.  I'm sure he will respond in his
I-am-Danny-Yoo-the-Python-Elemental kind of way :)
  If you are displaying or manipulating images of any kind, you really want
to look for the Canvas class widget in tkinter.  I've used a single Canvas
for the entire playing field of my little game and it has proven very
useful.
  Another thing you may want to look into may be threads.  These allow you
to do simultaneous operations, and I could not have gone much further than
nowhere without them.  You can find documentation on them inside python.
  Also, which interpreter are you using?  I was using IDLE for a long time,
but found it was buggy.  I compiled it on a Linux machine and it would run
differently from IDLE - same with a Macintosh machine.  So I changed to the
activestate product.  This seems to work much better.

  Let me know how you go,
  Glen.

  PS As a final tip...OOP is the way to go.  If your not already using it,
then get into it - it's great

----- Original Message -----
From: Chris McCormick <cmccormick@thestate.com>
To: wheelege <wheelege@tsn.cc>
Sent: Tuesday, February 27, 2001 7:02 AM
Subject: Python newbie with a couple of questions... :-)


> Glen,
>     I am a nebwie Python programmer, working on an AI testbed.  It'll be
> animated, and so I'm trying to learn how to display bitmaps, flip
> images, time events, and so on.  I'm having a terrible time finding
> decent documentation for any of this stuff.
>     I saw that you had some questions a few months ago that were very
> similar to mine.  I was hoping that you might share some of your source
> code with me, or at least where you got your answers.  If I could just
> get to the point where I'm displaying and flipping images, then I could
> get to the real work of my program.
>
> Thanks in advance for any help,
> Chris McCormick
>