Using python for desktop development (1)

Source: Internet
Author: User
Python is an object-oriented, literal translation computer. Program The design language is also a powerful and perfect general-purpose language. It has been developed for more than a decade and is mature and stable. This language is very simple and clear syntax, suitable for completing a variety of high-level tasks, almost all operating systems can run. Python is applicable to the development of various programs. Currently, it is most commonly used in the development of web programs, mobile programs, and desktop programs. However, it is a pity that python only provides one idle IDE, but the function is not flattering. The Python IDE features on the market are even more uneven, and the operations on controls are also crashing. I believe this problem will be solved soon. Wxpython is an open-source, cross-platform GUI tool library developed using C ++, currently, it supports windows, most UNIX and Linux, Apple Mac OS x, and mobile OS iOS, Sybian, and Android. However, wx does not have an official IDE. Therefore, we can only use third-party IDE for program development. In this article, we use eclipse as a development tool. This tool does not support python by default, but can be used as an extension language. First, make sure that you have installed python. The latest version is 3.1, but there are few documents on the network. Therefore, we recommend that you install Python 2.6. Install the GUI control library wx-2.8-msw-unicode at the same time. Click eclipse menu help> install new softwares. Add a pathon http://pydev.org/updates in the work with item and click Next to select pydev for installation (it takes some time, you can't wait to go to the installation package yourself ). After the installation is complete, we need to further set WINDOW> preferences? Pydev> interpreter-Python> New...> select python.exe from pythoninstallation environment. Then select all. In this way, the development of the desktop program in python is complete. Go to the eclipse main interface. After creating a project in File> New> otther> pydev project, go to pydev package explorer on the left to enter the development interface, we can see that there is no such thing. Input: Import WX

class app (wx. APP):
def oninit (Self):
frame = wx. frame (parent = none, title = ' This is frame title ' )
frame. show ()
return true

app = app ()
app. mainloop () saves and runs, and a window interface appears, even though Shenma has it above. Next, we will explore the control in Wx. This article from: Nanjing student network www.njxsw.com ※details> http://www.njxsw.com/thread-1767-1-1.html

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.