WxPython: Difference between revisions
Updated information about 3.0.1.0 preview build |
→External links: Link fix |
||
Line 105: | Line 105: | ||
{{Commons category}} |
{{Commons category}} |
||
* {{Official website|http://wxpython.org/}} |
* {{Official website|http://wxpython.org/}} |
||
* |
* [http://wiki.wxpython.org/ProjectPhoenix Project Phoenix main page] |
||
* [http://wiki.wxpython.org/wxPythonPit%20Apps List of applications developed with wxPython] |
* [http://wiki.wxpython.org/wxPythonPit%20Apps List of applications developed with wxPython] |
||
* [http://showmedo.com/videos/series?name=PythonWxPythonBeginnersSeries Tutorial screencasts for starting wxPython programming] at showmedo |
* [http://showmedo.com/videos/series?name=PythonWxPythonBeginnersSeries Tutorial screencasts for starting wxPython programming] at showmedo |
Revision as of 01:02, 17 January 2014
Developer(s) | Robin Dunn Harri Pasanen |
---|---|
Stable release | 3.0.0.0
/ December 25, 2013 |
Preview release | 3.0.1.0
/ January 4, 2014[1] |
Repository | |
Written in | C++ / Python |
Operating system | Cross-platform |
License | wxWindows License |
Website | wxpython |
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
Being a wrapper, wxPython uses the same free software licence used by wxWidgets (wxWindows License)[2]—which is approved by Free Software Foundation and Open Source Initiative.
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.[3]
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, 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()
Project Phoenix
Project Phoenix is an effort to make wxPython compatible with Python 3 which began in 2012.[4] This project is a new implementation of wxPython focused on improving speed, maintainability and extensibility. Just like "Classic" wxPython it wraps the wxWidgets C++ toolkit and provides access to the user interface portions of the wx API, enabling Python applications to have a GUI on Windows, Macs or Unix systems with a native look and feel and requiring very little (if any) platform specific code.[5]
Applications Developed with wxPython
- BitTorrent, a peer-to-peer Bit Torrent application
- Chandler, a Personal Information Manager
- Dropbox, a storage provider/file synchroniser
- Phatch, a Photo Batch Processor
- Métamorphose - A batch renamer
- PlayOnLinux and PlayOnMac - Wine front-ends
- GRASS GIS, a free, open source geographical information system
- Google Drive, desktop client for the Google cloud-based storage system.[6]
See also
- wxGlade, a wxWidgets GUI designer that creates wxPython code
- wxWidgets, a popular C++ GUI toolkit that wxPython uses as its framework
- XRCed, an XML tool for wxPython GUI design
References
- Notes
- ^ "wxPython 3.0.1.0 announcement on Google Groups". Retrieved 2014-01-08.
- ^ "Copyright notice". Retrieved 2009-02-27.
- ^ "wxPython 0.3 announcement on Yahoo Groups". Retrieved 2007-01-16.
- ^ "Project Phoenix announcement on Google Groups". Retrieved 2014-01-01.
- ^ "Project Phoenix readme file on GitHub". Retrieved 2014-01-01.
- ^ "Open source components and licenses". Google. Retrieved 28 January 2013.
- Bibliography
- Rappin, Noel; Dunn, Robin (March 1, 2006). wxPython in Action. Greenwich: Manning Publications. p. 552. ISBN 978-1-932394-62-7.
Further reading
- Precord, Cody (December 2010). wxPython 2.8 Application Development Cookbook. Greenwich: Packt Publishing. p. 308. ISBN 978-1-84951-178-0.