[Chicago] Windows GUI and Python
Feihong Hsu
hsu.feihong at yahoo.com
Sun May 13 04:42:15 CEST 2007
I second the recommendation on Windows Forms, but I recommend the
"Python for .NET" library instead of IronPython. Developing with
IronPython is a bit slower because IronPython starts up much slower
than CPython.
Uh, I was supposed to give a talk on this very topic, but I was busy
and I didn't go to this month's meeting. I said I'd post my slides,
but apparently I have no motivation to finish those slides unless I
know I'm giving a talk in a few hours.
I find wxPython tolerable, and I know it pretty well after using it
extensively for a few projects.
Here is the breakdown of how I'd compare the two GUI frameworks:
wxPython PROs:
- Cross platform
- Killer demo app with tons of useful examples
- You can a buy a book on it (wxPython in Action)
wxPython CONs:
- Reference docs are for the C++ library
- Documentation is somewhat incomplete
- Layout code is complicated
- Event handling is complicated
Windows Forms PROs:
- Not really cross platform (unless you stick with .NET 1.1 controls
and IronPython)
- Documentation is VERY complete (one page of description for every
method!) and there are many examples embedded in the documentation
- Event handling is simple
Windows Forms CONs:
- Documentation is for the C# library, and so are the examples
- Layout code is simple, but verbose and idiomatic
- When your Python code crashes, you don't get a nice stack trace
(unless you explicitly use the traceback module along with try/except
blocks)
- Set of core controls is somewhat small (compared to wxPython)
The two libraries have different strengths and weaknesses.
Personally I prefer Windows Forms over wxPython, by quite a bit.
Since I already know C#, I can follow the documentation quite easily.
Also, the API is more consistent than wxPython's, so sometimes I can
just guess the name of the method or property I need and don't even
have to look it up.
If I had to support Linux, I'd first think about whether I could just
use a subset of features available to IronPython for Mono. I'd also
maybe consider the console-based Urwid library, which is only
available for Linux.
- Feihong
"Atul Varma" <varmaa at gmail.com> wrote:
>
> If using .NET is an option, I've heard surprisingly good things
about
> Windows Forms programming in IronPython.
>
> http://www.voidspace.org.uk/ironpython/winforms/index.shtml
>
> Just looking at the code samples, it seems quite straightforward.
>
> I find WxPython confusing and have a difficult time navigating its
documentation.
>
> - Atul
>
On 5/9/07, Clint Laskowski <clint at bluehatsecurity.com> wrote:
> It's been a while since I've done any Windows GUI development (and
was
> never very proficient at it before).
>
> Now, I want to try some new ideas in Python which will need a
Windows GUI.
>
> Can someone post an update on the current best tools, etc.
>
> In the past, I've tried Gtk, Wx, and Tk in the past.
>
> Any help will be appreciated.
>
> -- Clint
>
> ---
> . Clint Laskowski, CISSP
> . email: clint at bluehatsecurity.com
> . mobile: 414-807-8845
____________________________________________________________________________________
Sucker-punch spam with award-winning protection.
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html
More information about the Chicago
mailing list