Tag: INF suffix to perform learning shel STD high cost performance Program advanced
First, preface
Python is a high-level programming language for interpreting, object-oriented, and dynamic data types.
- Many shell scripts can't handle or handle inconvenient things python can do
- Python code is simple, simple to configure, various open source Escudo
- High efficiency, high cost performance
Second, download the installation
Official website: https://www.python.org
2.1 Decompression
1) XZ
XZ is a lossless data compression file format using the LZMA compression algorithm (high compression rate)
XZ-D file. xz -z file # forced compression
2) Tar
tar zcvf file. Tar . GZ # Package folder or file tar zxvf file. tar. GZ # Unzip
File suffix if no. gz means that no gzip compression is used, just remove the parameter z of the TAR command
2.2 Installation
Enter the Python source directory:
./configure
The script Configure is used to generate makefile, which itself is generated by the autoconf software.
Make Make Install
Compiling and installing
2.3 First Python Program
1 #!/usr/bin/python2 ImportSYS3 Print '---'+sys.platform+'---'4 Print 'Please input your name:'5Get_str =Sys.stdin.readline ()6 Print 'Hello,'+get_str
First line: interpreted by Python on behalf of the file execution
Second line: Represents the introduction of system-related information module SYS
Third line: The operating system environment that represents the output run
Line five: Represents a line read from a standard input
Execution Result:
CentOS Preliminary Learning Record (eight) Python + Shell