wxPython Information & wxPython Links at HealthHaven.com
advertise
add site
services
publishers
database
health videos
Bookmark and Share

search wiki for    ?
web dir firms image gallery news pdf wiki shop video 
about
toolbar
stats
live show
health store
more stuff
JOIN/LOGIN
WxPython-logo.png

wxPython is a wrapper for the cross-platform GUI API (often referred to as a 'toolkit') wxWidgets (which is written in C++) for the Python programming language. It is one of the alternatives to Tkinter, which is bundled with Python. It is implemented as a Python extension module (native code). Other popular alternatives are PyGTK and PyQT. Like wxWidgets, wxPython is free software.

Contents

[edit] License

Being a wrapper, wxPython uses the same free software licence used by wxWidgets (wxWindows License)[1]—which is approved by Free Software Foundation and Open Source Initiative.

[edit] History

wxPython was born when Robin Dunn needed a GUI to be deployed on HP-UX systems and also on Windows 3.1 in a few weeks time. While evaluating commercial solutions, he ran across Python bindings for the wxWidgets toolkit. Thus, he learned Python and, in a short time, became one of the main developers of wxPython (which grew from those initial bindings), together with Harri Pasanen. The first versions of the wrapper were created by hand. However, soon the code base became very difficult to maintain and keep in sync with wxWidgets releases. Later versions were created with SWIG, greatly decreasing the amount of work to update the wrapper. The first "modern" version was announced in 1998 [2].

[edit] Example

This is a simple "Hello world" module, depicting the creation of the two main objects in wxPython (the main window object and the application object), followed by passing the control to the event-driven system (by calling MainLoop()) which manages the user-interactive part of the program.

 #!/usr/bin/env python   import wx   class TestFrame(wx.Frame):     def __init__(self, parent, ID, title):         wx.Frame.__init__(self, parent, -1, title)         panel = wx.Panel(self, -1)         text = wx.StaticText(panel, -1, "Hello, World!")         self.Show(True)   app = wx.App() frame = TestFrame(None, -1, "Hello, world!") app.MainLoop() 

[edit] See also

  • wxGlade, a wxWidgets GUI designer that creates wxPython code

[edit] External links

[edit] References

  1. ^ "Copyright notice". http://docs.wxwidgets.org/stable/wx_copyrightnotice.html. Retrieved 2009-02-27. 
  2. ^ "wxPython 0.3 announcement on Yahoo Groups". http://groups.yahoo.com/group/python-announce-list/message/95. Retrieved 2007-01-16. 
  • Noel Rappin, Robin Dunn,. wxPython in Action. Greenwich, CT: Manning Publications. ISBN 1-932394-62-1. 



Product Results (view all...)

search wiki for    ?
web dir firms image gallery news pdf wiki shop video 



↑ top of page ↑about thumbshots