GUI problem

Alex Martelli aleax at aleax.it
Fri Oct 11 03:10:18 EDT 2002


<posted & mailed>

Benson Ngai wrote:

> Thank you very much for answering my question.
> I think I am gonna learn python as a standalone programming fist.

Good idea!

> so... what would be a gd book for that?? I find a lot of book talks
> about python as a "scripting language" so.. would you please suggest
> me a good beginner book? (ps. I do have some experience with C++.)

If you're a beginner, I suggest Gauld's "Learn to Program Using Python",
Addison-Wesley.  But C++ is complicated enough that if you know it
you're no beginner at programming -- then you may prefer Ascher and
Lutz's "Learning Python", O'Reilly (unfortunately not yet updated to
Python 2.2 -- but learning a solid basis in the older 1.5.2 release,
which is what Ascher and Lutz cover, still helps a lot); or Holden's
"Python Web Programming", New Riders (also covers other technologies
you need to know in order to program for the web, from TCP/IP to SQL 
and more); or Hetland's "Practical Python", APress -- unfortunately,
I have not yet received the copy of the latter which I was promised
as a technical reviewer of about half of its chapters, so I can't be
sure, but from what I saw the book seemed quite promising.

According to Amazon's correlations, many people buy more than one
Python book -- if that's your case, then besides the above,
introductory titles, you may want to consider Beazley' "Essential
Reference", New Riders, extremely concise yet thorough; Martelli
and Ascher (eds)'s "Python Cookbook", O'Reilly, the book that's
really authored by something approaching the whole Python
community; and/or my "Python in a Nutshell", O'Reilly, when it
finally comes out (it's being final-edited now -- late, but I
hope the delays wrt earlier predictions are compensated by its
breadth and depth...:-).


> And about the GUI, you guys have mentions so many different packages
> so...what would be the easier one to learn? it would be great if i can
> run the game on both windows 2000 and linux, but if I can only get it
> to run under linux, that's fine too.

I think your best bet might be PyUi, http://pyui.sourceforge.net/ -- I
have not used it "in production", but it seems clean and powerful,
with a simple core.  Unfortunately it does have many dependencies --
PyGame, PyOpenGL, and the Python Imaging Library -- so that setting
it up may be a bit of a bother.  Easiest to set up, and reasonably
easy to program, is Tkinter, still the most used Python GUI kit
despite the existence and various advantages of so many others -- on
Windows it comes with the standard Python binary distribution, on
Linux it's automatically built IF you start with an installation
of a reasonably-recent Tcl/Tk version in standard places before you
install Python from sources.  PyQt is easy to install only if you
get it as a part of the BlackAdder toolkit (commercial, but a
personal license costs little more than a good technical book, and
gives you niceties such as a "GUI Painter", something that some
people really go for) -- and becomes easy to get started in mostly
thanks to Rempt's good book "Python GUI Programming: PyQt Edition",
Opendocs Llc (highly recommended).


Alex




More information about the Python-list mailing list