[python] python for GUIs

Bob Ippolito bob at redivi.com
Wed Sep 29 22:42:51 EDT 2004


On Sep 29, 2004, at 10:11 PM, Mitch Pirtle wrote:

> Hellooooooooo........
>
> Thought I would kick off a discussion started at the meeting's beer
> fest about creating a GUI to manage websites.  The two environments
> being looked at are python and XUL.
>
> I like python because you can prototype rapidly, and there are tons of
> libraries that can help out as well (wxPython, etc).  However, anyone
> wanting to run the app will need these libraries and python installed.

Not necessarily.  For Windows you have py2exe, OS X you have py2app, 
and Linux you have cx_Freeze, etc. that take ALL of your dependencies 
(including Python itself, if necessary) and put it in a distributable 
format.

> Q:  How hard is it to distribute the executables and libraries with
> the program, and how big would that file be as a base?

A couple megs per platform, depends on which GUI library/libraries you 
use.  In some cases almost nothing.  If you were targetting Mac OS X 
10.3+ specifically, you would have negligible overhead (860k or so 
uncompressed, 275k zip -9'ed) since Python and Cocoa are already there. 
  Bringing something like wxPython into the mix is going to add a few 
megs, and then to target platforms without a suitable Python you will 
add another meg or so.

That said, a typical wxPython based application (that includes a Python 
runtime) is going to be around 3.5-5 megs in distribution form (Windows 
installer, zipped Mac application, etc.).

> XUL will probably take longer to do, and will also be based on a lot
> of javascript (something I detest); but will work with Mozilla-based
> browsers - so no additional download for most...

Isn't there a way to integrate with non-javascript stuff?  XPCOM or 
something?  Worst case you could have a server that the XUL/JS app 
talks to.  My biggest issue with XUL is that your application loses 
platform specific functionality that makes applications nice to use 
(sensible drag and drop in and out is probably the big one).  But then 
again, I'm typing this on a Mac, so I'm pickier than most.

That said, if you ended up developing outside the "pure-XUL" platform 
you lose a lot of the benefits that XUL had in the first place (ease of 
distribution, distribution size).

> Q:  For ease of distribution, is it worth the extra effort in the
> development cycle?

Maybe you should do a quick count the number of good applications (ones 
that you enjoy using and have a nice UI) that use XUL (Mozilla itself 
shouldn't count), and compare it to the number of good applications 
that use <insert other GUI paradigm>.  Then factor in how long it would 
take you to learn the platform, develop using the platform, and how 
likely it is you think you'll get help (if it's open source) or can 
afford help (otherwise).

-bob



More information about the python mailing list