REVISED: Sunday, March 3, 2013
In this tutorial, you will learn how to download and install, the wxPython GUI toolkit.
I. wxPYTHON INTRODUCTION
The principal author of wxPython is Robin Dunn. wxPython is a wrapper around wxWidgets, which is a mature cross platform C++ library. wxPython is a Graphical User Interface (GUI) toolkit which is free to use; even for commercial products!
II. DOWNLOADING AND INSTALLING wxPYTHON
Select the most current version of the wxPython GUI toolkit that supports the most current version of Python. For example, I have Python 3.2.2; however, at the time of the writing of this tutorial, wxPython only supported Python 2.7.3; therefore, I had to download Python 2.7.3 and the version of wxPython that supported Python 2.7.3. For those of you who are new to programming, you can have more than one version of the same programming language on your computer at the same time. However, you have to remember to save your files to the correct folder containing the language version you are working with.
Make sure you have the most recent version of Python supported by wxPython, before you download wxPython. If you do not have the appropriate version of Python, download the appropriate version of Python first, then download the wxPython GUI toolkit.
To download the wxPython GUI toolkit, click on the following link:
wxPYTHON.
When you are ready to do the wxPython download, select the appropriate download for your computer; and during the download, select all of the defaults. By selecting all of the defaults, everything will be saved into the correct folders required by Python.
My computer uses Microsoft Windows; therefore, I used the "win32-Unicode Windows Installer" for Python 2.7.
III. TESTING DOWNLOAD AND INSTALLATION
Start the Python 2.7.3 interpreter shell by "double left mouse clicking" the Python icon on your desktop. When the "Python Shell" window opens select "File", then select "New Window".
In the "New Window" type the following:
# wxPython download verification.
import wx
app=wx.App()
win=wx.Frame(None)
win.Show()
app.MainLoop()
From the "New Window", do a "File Save As" and save the above Python program, using the file name wxPythonValidation.py to the same path which your computer used to download Python 2.7.3. For example, I saved my wxPythonValidation.py file to my Python27 folder using the following path:
From the "New Window", do a "Run" and then a "Run Module F5" and
a "blank frame", also called a "blank window", should open. If you have a "blank frame", you have verified your wxPython download and installation, and you are ready to use the wxPython GUI toolkit.
As time goes by you will want to ensure you have the latest version of wxPython installed. To check your wxPython version, run:
import wx
print wx.version()
For example, my current wxPython version is 2.8.12.1 (msw-unicode) which is also the most current version of wxPython as of the date of this tutorial.
As time goes by you will want to ensure you have the latest version of wxPython installed. To check your wxPython version, run:
import wx
print wx.version()
For example, my current wxPython version is 2.8.12.1 (msw-unicode) which is also the most current version of wxPython as of the date of this tutorial.
In this tutorial, you have learned how to download and install, the wxPython GUI toolkit.
Elcric Otto Circle
Elcric Otto Circle
-->
-->
-->
How to Link to My Home Page
It will appear on your website as:"Link to ELCRIC OTTO CIRCLE's Home Page"
No comments:
Post a Comment