Build a python GUI development environment

Source: Internet
Author: User

Recently, I am interested in Python development. I have been stuck on a surface layer for python development.

Python is easy to start with, and its syntax is easy to understand. It comes with mature class libraries for network communication and open-source packages developed by third parties.

In GUI development, Python has a tkinter library and a third-party library (such as wxpython and QT)

 

Today, we will briefly introduce how to build and use the wxpython development environment.

 

Use the development environmentWxformbuilder + uipad + wxpython,Install in sequence

Python 2.6:Http://www.python.org/download/releases/2.6.7/

Wxpython 2.8:Http://www.wxpython.org/download.php#stable

Wxformbuilder 3.2 BETA:Http://sourceforge.net/projects/wxformbuilder/

Uicontrol 4.0:Http://www.onlinedown.net/soft/101104.htm


Python GUI program development steps

 

1. wxformbuilder Interface Design Process

I will not describe it here. You can use the wxpython interface design method under Baidu.

 

2. After the interface design is complete, respond to the button event

As shown in, a response event is generated.Code

 

 

3. After event ing, copy the Python code to the py file.

 

4. Use ulipad to edit the py file

Add the app initialization code at the end of The py file, and add the response code to the corresponding event.

 
1 ClassAPP (wx. app ):
2DefOninit (Self ):
3Frame = myframe1 (none) # The frame class name of the GUI is generated here.
4Frame. Show ()
5ReturnTrue
6
7APP = app ()
8
9App. mainloop ()


5. Run the py file

First wxpython InterfaceProgramThis is done here. If you are interested, you can perform further research.

 

Python-related learning materials:

Wxpython-in-action

Wxpython. API reference manual

Go deep into Python Chinese version-2.5

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.