How to install WxPython

Charles

Member
Reputation
0
How to install 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" [1]

Steps to install:

1. Go to http://www.wxpython.org/
2. Find the downloads section on the left hand bar and click "Stable"
3. Find your operating system and Python version.
4. Hit the link that takes you to the download page (It's on Sourceforge)
5. Wait for the download to finish
6. Run the installer
7. If you've done all these steps it should work.

TO TEST:

Save this code as frame.py:
Code:
import wx

class charlie(wx.Frame):
    def __init__(self,parent,id):
        wx.Frame.__init__(self,parent,id,'Frame', size=(300,200))
        panel=wx.Panel(self)
        self.Bind(wx.EVT_CLOSE, self.closewindow)
    def closewindow(self,event):
        self.Destroy()
if __name__=='__main__':
    app=wx.PySimpleApp()
    frame=charlie(parent=None,id=-1)
    frame.Show()
    app.MainLoop()

You should now have an empty frame!

I know this isn't the most advanced tutorial, but I think it is a pretty useful one because it explains how to get a VERY useful tool.

Enjoy ::thumbsup::
 
Hey Factor what is the Different Between WXpython and Python??

and can u make a tut how to install Python i download it but never used it before i am more VB guy maybe becuse its more Visual u see things

thanks.
 
>>Factor

I'm Carolus thanks.

wxPython is Python with the wxWidgets extension. Python is just Python. What System are you on btw? Python for windows should be easy enough.
 
Carolus Magnus said:
>>Factor

I'm Carolus thanks.

wxPython is Python with the wxWidgets extension. Python is just Python. What System are you on btw? Python for windows should be easy enough.

lol
 
Carolus Magnus said:
>>Factor

I'm Carolus thanks.

wxPython is Python with the wxWidgets extension. Python is just Python. What System are you on btw? Python for windows should be easy enough.

Carolus Sorry bro i though it was factor lol..

ok yes i am using windows but i dont know maybe i did not take my time to read it lol. but i would love to install it and give a try..
 
AstriMc said:
Carolus Magnus said:
>>Factor

I'm Carolus thanks.

wxPython is Python with the wxWidgets extension. Python is just Python. What System are you on btw? Python for windows should be easy enough.

Carolus Sorry bro i though it was factor lol..

ok yes i am using windows but i dont know maybe i did not take my time to read it lol. but i would love to install it and give a try..

You just download the installer XD
 
Thanks Charlie I like this tutorial

Off-topic; Congratz with your Section Leader rank! :D
 
Back
Top