wxPython

From Wikipedia, the free encyclopedia - View original article

WxPython
WxPython-logo.png
Developer(s)Robin Dunn
Harri Pasanen
Stable release2.8.12.1 / July 23, 2011; 2 years ago (2011-07-23)
Preview release2.9.5.0 / August 31, 2013; 2 months ago (2013-08-31)
Development statusActive
Written inC++ / Python
Operating systemCross-platform
LicensewxWindows License
Websitewxpython.org
 
Jump to: navigation, search
WxPython
WxPython-logo.png
Developer(s)Robin Dunn
Harri Pasanen
Stable release2.8.12.1 / July 23, 2011; 2 years ago (2011-07-23)
Preview release2.9.5.0 / August 31, 2013; 2 months ago (2013-08-31)
Development statusActive
Written inC++ / Python
Operating systemCross-platform
LicensewxWindows License
Websitewxpython.org

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.

License[edit]

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.

History[edit]

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]

Example[edit]

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, title):         wx.Frame.__init__(self, parent, wx.ID_ANY, title=title)         text = wx.StaticText(self, label="Hello, world!")   app = wx.App(redirect=False) frame = TestFrame(None, "Hello, world!") frame.Show() app.MainLoop() 

Applications Developed with wxPython[edit]

See also[edit]

References[edit]

Notes
  1. ^ "Copyright notice". Retrieved 2009-02-27. 
  2. ^ "wxPython 0.3 announcement on Yahoo Groups". Retrieved 2007-01-16. 
  3. ^ "Open source components and licenses". Google. Retrieved 28 January 2013. 
Bibliography

Further reading[edit]

External links[edit]