making windows apps

Carlos Ribeiro carribeiro at gmail.com
Fri Sep 10 19:13:01 EDT 2004


On Fri, 10 Sep 2004 07:52:55 -0700, Zach Shutters <zshutters at comcast.net> wrote:
>     I am new to python and working my way through the van Rossum tutorial. I
> am cursios though about if you can program windows with python? I know I
> shouldn't worry about this right now but I am curious. If so, is there any
> recommended tutorials on this. I know I can search google but i figured I
> would see what some people who know the language well would recommend.

Python can be used to write graphical native applications for both
Windows and Linux. In any case, you need to choose first what
windowing library (or toolkit) you're going to use. If you are used to
the Windows way of doing things, relax -- the only difference is that
if you use MS tools, you have no choice but to use the toolkit that
Microsoft provides (so you never knew that it was possible to have a
choice), but now you have a few options.

The main windowing libraries available for use with Python are:

-- Tk
-- wxPython
-- Qt

I suggest that you take look at wxPython (at www.wxpython.org). It's
cross platform, which means that an app written using it will run
without changes in Linux and Windows systems while keeping the same
look and feel. Tk is easy to use, and well supported in Python, but I
prefere wxPython (that's a personal opinion, and your mileage may
vary). As for Qt, the library is excellent, but the it's only
available under a commercial license for Windows.

The next step is to choose a programming environment. Again, if you
are used to VB or Delphi, you never knew that you had a choice here,
because these tools pack everything -- the language, the supporting
libraries, the windowing libraries, and the programming environment
into a single package. It would really be nice to have such a pack for
Python (and in fact, there are a some good, but high-priced commercial
options available; for example, BlackAdder or Wingz); however, if
you're using only free tools, then the selection is relatively
limited, but still useful enough for most needs.

If you took my advice and selected wxPython, the two best choices for
the IDE are Boa Constructor and PythonCard. The former is a very
advanced IDE, but it's still in development. PythonCard is simpler and
a little bit easier to use, but it's also not released yet -- only the
development version is available.

>     One last thing, in order for a program I write in python to run on
> someones computer, they have to have the python interpreter installed? And
> if so, wouldn't most people not have it installed since they wouldn't be
> programming in it. I know this is probably an uber nube question, but that's
> what I am right now. Hopefully no one will get pissed off and give some
> smart ass comment about how stupid my question is (sorry but most of the
> time thats what I get when I post in a newsgroup lol)

There are easy ways to pack everything that is needed to distribute
any type of Python program into a single installer. I don't have the
pointers here but I've done it before and it's a snap. It works for
any type of app, including Windows apps; the installation kit
generates a single exe file for easy distribution.


-- 
Carlos Ribeiro
Consultoria em Projetos
blog: http://rascunhosrotos.blogspot.com
blog: http://pythonnotes.blogspot.com
mail: carribeiro at gmail.com
mail: carribeiro at yahoo.com



More information about the Python-list mailing list