PyFLTK - an underrated gem for GUI projects
Peter Hansen
peter at engcorp.com
Sun Nov 6 21:57:03 EST 2005
aum wrote:
> To me, wxPython is like a 12-cylinder Hummer, with fuzzy dice hanging
> from the mirror, fridge and microwave in the back, and DVD consoles on
> every seat, towing a campervan - absolute power and luxury, giving 8mpg
> if you're lucky.
>
> wxPython has the cost of a massive disk and memory footprint. A 'hello,
> world' turned into a windoze exe with py2exe weighs in at around 15MB,
> and takes 6-10 seconds to load up on a 2GHz Athlon box, about as long as
> Photoshop! For large and intricate apps, wxPython is a logical choice,
> but for smaller progs it's serious overkill IMHO.
While I don't disagree with your characterization above, I don't think
your numbers are quite right.
The wxPython program below, py2exe'd on my machine (1.6GHz Pentium M),
comes to only 12MB (2-3MB of which is Python itself), and takes 1-2
seconds to load (actually less than one second after the first
invocation following a fresh reboot).
Yes, 12MB is pretty heavy, but if it's taking that long to load I think
something might be wrong on your machine.
(Python 2.4, wx 2.6.1.0, py2exe 0.6.3, Win XP SP2)
-Peter
-------------------------------
import wx
class Frame(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, -1, "Hello")
self.Bind(wx.EVT_PAINT, self.OnPaint)
self.Show(True)
def OnPaint(self, event):
dc = wx.PaintDC(self)
dc.DrawText('Hello, world!', 10, 10)
app = wx.PySimpleApp()
f = Frame()
app.MainLoop()
More information about the Python-list
mailing list