(Translated by https://www.hiragana.jp/)
WxPython: Difference between revisions - Wikipedia Jump to content

WxPython: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Tjohnson2 (talk | contribs)
Updated information about 3.0.1.0 preview build
Line 105: Line 105:
{{Commons category}}
{{Commons category}}
* {{Official website|http://wxpython.org/}}
* {{Official website|http://wxpython.org/}}
* {{Project Phoenix main page|http://wiki.wxpython.org/ProjectPhoenix}}
* [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

WxPython
Developer(s)Robin Dunn
Harri Pasanen
Stable release
3.0.0.0 / December 25, 2013; 10 years ago (2013-12-25)
Preview release
3.0.1.0 / January 4, 2014; 10 years ago (2014-01-04)[1]
Repository
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

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

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
  1. ^ "wxPython 3.0.1.0 announcement on Google Groups". Retrieved 2014-01-08.
  2. ^ "Copyright notice". Retrieved 2009-02-27.
  3. ^ "wxPython 0.3 announcement on Yahoo Groups". Retrieved 2007-01-16.
  4. ^ "Project Phoenix announcement on Google Groups". Retrieved 2014-01-01.
  5. ^ "Project Phoenix readme file on GitHub". Retrieved 2014-01-01.
  6. ^ "Open source components and licenses". Google. Retrieved 28 January 2013.
Bibliography

Further reading