Hello World Program

Source: Internet
Author: User

Since software development tutorials started, I tend to use the simplest Hello World Program as the starting point. I can't help but fall behind this Convention. Let's start with the hello World Program. Starting from this short program, we started our journey of exploring python to develop Win32 API applications on the Windows platform. I hope this trip will allow you to learn more, it will also bring more fun, so that we can change the world and make the world better. Yes. After you learn to develop Win32 applications using python, you can control the world as much as possible.

After you have installed Milang (Milang is a software developed by me: combining Python 3.4 and notepad ++), you can start to write Win32 applications. If you're still confused, when you can't find the north, just click here (http://download.csdn.net/detail/caimouse/7628653), then download the Milang installation package, installed in your computer, the only thing to note, it can only be installed under the root directory of each hard disk. Otherwise, python will not be able to access the library function, resulting in abnormal operation. If you prefer the original Python 3.4 version, you can download it from the python official website. You can also run all the examples in this book. By now, the development environment is ready. You may ask, is that simple? Yes, that's simple. You only need to install one software. The size of the software is only dozens of MB, which is significantly different from the size of the installation packages of several G development tools.

By now, you already have assets for developing Python Win32 applications. Next, enter a few lines of code and press F5 (in the Milang environment ), A window pops up to display the hello World string. The code for the Hello world application is as follows:

From ctypes import *

MessageBox = Windll. user32.messageboxw

MessageBox (none, 'Hello world! ', 'Hello world', 0)

Shows the running result:

 

Figure 2-1: Result of running the hello World Program

 

 

 

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.