"Getting Started with Python" Windows 7 Python Web development Environment build notes

Source: Internet
Author: User

In the recent attempt to create a Web application using the Python language on IBM Bluemix, you need to build a Python web development test environment locally.

About the version number of Python

Go to the Python site. Move the mouse over the navigation bar to download and we will find a download link with the main version number two!


What is the difference between the two?

Personally understand that the version number of 2.7.x is a more stable version number, and the 3.x version number is the more advanced version number, including a lot of new features and so on.

But suppose you want to develop a new project with Python, how do you choose the Python version number? Most Python libraries support both Python 2.7.x and 3.x version numbers at the same time, so no matter which version number is selected, it is possible.


But there are some differences that need to be noted: summary of important differences in Python 2.7.x and 3.x version numbers

Download python

The version number is not specified in Bluemix because it is assumed. V2.7.10 is selected by default, so I decided to download the installation V2.7.10.

My operating system is Windows 7 64-bit, so you need to choose to download 64-bit installation package, click to enter the Python download page;

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center "/>

Install Python

Run the installation package that you just downloaded


Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center "/>

Add Python.exe to Path (join Python to PATH environment variable) Be sure to choose! Otherwise you will encounter the problems seen in the picture below.

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center "/>

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center "/>

Running the installation process


The period may pop up a DOS form, very quickly close itself;

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center "/>

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center "/>

The installation is complete here, open the command line and enter "Python". Then enter to see it!

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center "/>

About PIP

Pip is a tool for installing and managing Python packages and is a replacement for Easy_install.

See some articles on the web about PIP also need to be installed separately. is out of date. Go through the steps above. PIP has been installed.

About the Python IDE

What is an IDE?

ide= Integrated development environment = integration of development-related environments (and tools)

Python ide= Python's integrated development environment = a variety of tools related to python development


In the Start menu program Python 2.7, you can see such as the following menu:


Open the interface for example:

It's just that Python's own command line is very uncomfortable, because you can't repeat the previous command with the up and down keys.

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center "/>


Local Document service:


Hello World


Paste the following code:

#!/usr/bin/python#-*-coding:utf-8-*-print ' Hello World ' for I in range (1,5): for    J in Range (1,5): For        K in rang E (1,5):            if (i! = k) and (I! = j) and (J! = k):                print ' Hello World ', i,j,k
Save the file. Run the View results:

The output results are for example:


You can also run on the command line, for example by:


Summary

Here, the Python web development environment is built, very simple.

Some small partners may be angry, I have not seen the shadow of the web!

Ha ha. I also just found that Python and go language, like webserver can write their own;


Cond......

Next: "Getting Started with Python" The first Python Web program--Simple webserver


"Getting Started with Python" Windows 7 Python Web development Environment build notes

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.