Python language entry-level use (i)

Source: Internet
Author: User

Recently not too busy, find Python written by the program simple easy to understand, ready to learn the mystery of it,

Python can be used directly under Linux, with embedded Python system in common

Under Windows need to download a python, I downloaded a activePython3.0 version, where syntax and 2.X are a little different

You can execute a piece of code directly below Python

For example, the + + automatically recognizes and returns 2

You can also write the Chengxu program into a file and execute the script with the Python command.

After writing a Python code, save the file, such as "helloworld.py", to run it, you can run under CMD, first under CMD to the directory where your helloworld.py is located.

You can run Python helloworld.py.

If an error

"' Python ' is not an internal or external command, nor is it a running program

or batch file. ”

Prove that you did not set the environment variable. You need to place the Python installation directory in the environment variable.

I was installed in "D:\Python33", So right-click "My Computer"-"Properties-" Advanced environment Settings-"advanced-" environment variable

Find the path in the system variable, click Edit to put your Python installation directory inside, my is D:\Python33, add in, just fine. Note the ";" between environment variables Separated.

Try the python command again with CMD.


Python language entry-level use (i)

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.