Python Introductory chapter (i)

Source: Internet
Author: User
Tags python script

First, the introduction of Python

Python Learning Blog:
Http://www.cnblogs.com/haiyan123/p/8387770.html#lable1
http://www.cnblogs.com/alex3714
Http://www.cnblogs.com/linhaifeng/p/7278389.html
https://www.liaoxuefeng.com/wiki/0014316089557264a6b348958f449949df42a6d3a2e542c000

1. Introduction to Python
Python是著名的“龟叔”Guido van Rossum在1989年圣诞节期间,为了打发无聊的圣诞节而编写的一个编程语言,Python官方网站 。Python是一种计算机程序设计语言。你可能已经听说过很多种流行的编程语言,比如非常难学的C语言,非常流行的Java语言,适合初学者的Basic语言,适合网页编程的JavaScript语言等等。Python 是一个高层次的结合了解释性、编译性、互动性和面向对象的脚本语言。解释型语言:这意味着开发过程中没有编译环节,类似于PHP和Perl语言。交互式语言:这意味着可以在一个Python提示符直接互动执行你写的程序。面向对象语言:这意味着Python支持面向对象的风格或代码封装在对象的编程技术。
2. Python Features
易于学习:Python有相对较少的关键字,结构简单,和一个明确定义的语法,学习起来更加简单。易于阅读:Python代码定义的更清晰。易于维护:Python的成功在于它的源代码是相当容易维护的。丰富的标准库:Python的最大的优势之一是丰富的库,跨平台的,在UNIX,Windows和Macintosh兼容很好。互动模式:互动模式的支持,您可以从终端输入执行代码并获得结果的语言,互动的测试和调试代码片断。可移植:基于其开放源代码的特性,Python已经被移植(也就是使其工作)到许多平台。可扩展:如果你需要一段运行很快的关键代码,或者是想要编写一些不愿开放的算法,你可以使用C或C++完成那部分程序,然后从你的Python程序中调用。数据库:Python提供所有主要的商业数据库的接口。GUI编程:Python支持GUI可以创建和移植到许多系统调用。可嵌入: 你可以将Python嵌入到C/C++程序,让你的程序的用户获得"脚本化"的能力。
3. Python application field
Web开发:最火的Web框架Django,支持异步高并发的Tornado。网络编程:支持高并发的Twisted网络框架。爬虫:爬虫领域,Python几乎是霸主地位,想爬啥就爬啥,就是这么任性。云计算:最火最知名的云计算框架就是OpenStack,Python之所以这么火,很大一部分是因为云计算。人工智能:谁会成为AI 和大数据时代的第一开发语言?这本已是一个不需要争论的问题。如果说三年前,Matlab、Scala、R、Java 和 Python还各有机会,局面尚且不清楚,那么三年之后,趋势已经非常明确了,Python 作为 AI 时代头牌语言的位置基本确立,未来的悬念仅仅是谁能坐稳第二把交椅。自动化运维:问问中国的每个运维人员,运维人员必须会的语言是什么?10个人相信会给你一个相同的答案,它的名字叫Python。游戏开发:在网络游戏开发中Python也有很多应用。Python和其它语言的对比C语言代码---->机器码---->计算机运行其它高级语言代码---->字节码---->机器码---->计算机运行
4. Python Interpreter type
当我们编写Python代码时,我们得到的是一个包含Python代码的以.py为扩展名的文本文件。要运行代码,就需要Python解释器去执行.py文件。CPythonPython的官方版本,使用C语言实现,使用最为广泛,CPython会将源文件(py文件)转换成字节码文件(pyc文件),然后运行在Python虚拟机上。PyPyPython实现的Python,PyPy运行在CPython(或者其它实现)之上,用户程序运行在PyPy之上,将Python的字节码再动态编译成机器码(非解释),它的目标是执行速度。其它Python如Jyhton、IronPython、RubyPython、Brython等。小结:Python的解释器很多,但使用最广泛的还是CPython。如果要和Java或.Net平台交互,最好的办法不是用Jython或IronPython,而是通过网络调用来交互,确保各程序之间的独立性。
5. Python Environment installation

Windows
Download the latest version of Windows from the official Python website, my system is 64-bit, so I choose the 64-bit installation package.
32-bit: Python-3.5.2.exe
64-bit: Python-3.5.2.exe

Double-click the downloaded installation package, customize the installation, and add to the environment variable

Default, Next

Change the installation path, install

Complete the installation, Close

Verify that the installation is successful

6. Python Development tools Pycharm

Pycharm Installation
Download the latest version from the official website of Pycharm, here I choose the Community version, for our daily development use is enough, if not bad money can choose the professional version.
Community Edition (free): Pycharm-community-2017.3.exe
Professional Edition (charge): Pycharm-professional-2017.3.exe
Double-click on the downloaded installation package, Next

Change the installation path, Next

Choose 64-bit, Next

Install

Finish installation, Finish

Pycharm use
Click on the Desktop Pycharm icon, go to Pychram, select the second one, OK

Select UI Theme (you can also skip settings, choose Default), this is a person's preference, I choose darcula,next:featured plugins

Start using Pycharm, you can also selectively install some plugins

Create New Project

Custom Project hosting directory, IDE by default is associated with Python interpreter, Create


The IDE provides a hint to choose not to show a prompt at startup, Close


Create folder, New--->directory--->day01


Create a. py file, New--->python file--->helloworld


Pycharm Configuration
Document encoding, File--->default Settings--->encoding--->file encodings--->utf-8--->ok

Template, File--->default Settings--->templates--->file and Code Templates--->python Script--->ok

Mouse scrolling adjusts font size, File--->settings--->mouse--->general--->change font size (Zoom) with Ctrl+mouse Wheel---> Ok

Markdown plug-in installation, File--->settings--->plugins--->install jetbrains Plugins--->Markdown-->Install--> Restart Pycharm-->ok

Python Introductory chapter (i)

Related Article

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.