Because the future of the laboratory needs big data security related work, in advance to get instructions from the teacher, need to learn python, in fact, I have long wanted to learn python, for network security, Python is a very aspect of the scripting language, haha, now why not use this opportunity to learn a happy:
All of the following are organized from Liaoche's official website, a good Python learning tutorial, suitable for quick start, url Liao Xuefeng's official website
1.Python is an interpretive language
Unlike other compiled languages, Python is an interpreted language, with the advantage that the code is small and the disadvantage is that it is slow to run, but a lot of applications don't need to run so fast because the user doesn't feel it. such as the development of a download MP3 Web application, c program run time takes 0.001 seconds, and the Python program run time needs 0.1 seconds, 100 times times slower, but because the network is slower, need to wait 1 seconds, you think, users can feel the difference between 1.001 seconds and 1.1 seconds? This is like the F1 car and the ordinary taxi on the third Ring road in Beijing, the same reason, although the F1 racing theory speed of up to 400 km, but because the third ring road traffic jam speed of only 20 kilometers, so as a passenger, you feel the speed is always 20 kilometers. The second drawback is that the code cannot be encrypted. If you want to publish your Python program, you are actually publishing the source code. But inspirational to be a hacker, must have the spirit of open source.
Python is a programming language written by the famous "Uncle Turtle" Guido van Rossum during Christmas 1989 to send a boring Christmas. (MD A Christmas to develop a programming language, Daniel's world we never understand!!!!) Python provides us with a very well-established codebase, covering a wide range of content, such as networks, files, GUIs, databases, text, and so on, and is visually called "Built-in battery (batteries included)". Developed in Python, many features do not have to be written from scratch, directly using ready-made. In addition to the built-in libraries, Python also has a large number of third-party libraries, which others have developed for you to use directly. Of course, if you develop code that is well encapsulated, it can also be used as a third-party library for others. Uncle Turtle to Python positioning is "elegant", "clear", "simple", so the Python program seems always easy to understand, beginners learn python, not only easy to get started, and in the future, can write those very very complex programs. In general, Python's philosophy is simple and elegant, as much as possible to write easy-to-read code, as far as possible to write less code. If a veteran programmer shows off the obscure, tens of thousands of-line code he writes, you can laugh at him.
What types of applications should 2.Python be developed for?
Preferred is the Web application, including the website, background services and so on;
The second is a lot of daily needs of small tools, including the system administrator needs the script task, etc.;
In addition, the development of other language programs to be packaged again, easy to use.
3.2.x or 3.x?
Currently, Python has two versions, One is version 2.x, one is the 3.x version, these two versions are incompatible, because Python is now evolving towards the 3.x version, in the process of evolution, a large number of 2.x version of the code to be modified before it can be run, so there are many third-party libraries are temporarily unable to use on the 3.x. In order to ensure that the program can use a large number of third-party libraries, our tutorials are still based on the 2.x version, specifically, the 2.7 version. Make sure that the Python version installed on your PC is 2.7.x so that you can learn this tutorial without pain. (In fact, I am in a tangle, in the future we all use 3.) X at the time, from 2. Does x turn out to be a painless experience? tot)
4. Install Python
Because Python is cross-platform, it can run on Windows, Macs, and various Linux/unix systems. Write a Python program on Windows and put it on Linux to run it. To start learning Python programming, you first have to install Python on your computer. Once installed, you will get the Python interpreter (which is responsible for running the Python program), a command-line interaction environment, and a simple integrated development environment.
Install Python on Windows
First, download the latest version of 2.7.9 from the official Python website www.python.org, this is the address: Http://www.python.org/ftp/python/2.7.9/python-2.7.9.msi
In particular, be careful to select pip
and Add python.exe to Path
, then go all the way "Next" to complete the installation.
The default is to install to the C:\Python27
directory and then open a Command Prompt window, typing python, validating, and ‘python’不是内部或外部命令,也不是可运行的程序或批处理文件。
adding environment variables if prompted. Because Windows will be based on a Path
path set by the environment variable to find python.exe
, if not found, will be an error. If you omit the tick when you install Add python.exe to Path
it, manually python.exe
add the path you are in C:\Python27
to path. appear >>> OK ~ ~ ~
Python self-study road No.1-python installation and configuration