http://edu.51cto.com/course/course_id-527.html free Video
For handling system administration tasks and web programming
https://www.python.org/official website
1. Installation and use under Windows
Linux is built-in, no installation required
Landing page Download: www.python.org, available in 3.3X and 2.7X, download 2.7
Recommended installation of the 3.x version above, already compatible with 2.7
2. Small example
Defining variables: x=12
Print X:print (x)
3. Basic architecture of Python program
Input
Assigning values to variables
Input statement
Processing
Arithmetic operations
Logical operations
Algorithmic processing
Output
Print output
Write file
Write to Database
--variable assignment-arithmetic operations-print out the entire process
>> x = 12
>> y = 10
>> z = x + y
>> print (z)
--Input statement-algorithmic processing-print output
>> str1 = raw_input ("plz input a string:")--the keyboard enters a string and assigns the variable to the STR1
plz input a string:www.11test.blog.51cto.com
>> Print (STR1)--Printing strings
Www.11test.blog.51cto.com
>> n = len (str1)--statistics str1 how many characters
>> print (n) Printing characters
25
4. Python output statement, input statement
Output: print () function
Print shaping, floating-point, string data
>> Print (1000)
1000
>> Print (12.54545)
12.54545
>> print (' DD ')
Dd
>> print (' www.11test.blog.51cto.com ')
Www.11test.blog.51cto.com
>> print (' a ')
A
Print () formatted output
Print (Format (val,fomat_modifier))
Val: Value
Format_modifier format Word
>> Print 12.345678
12.345678
>> Print (Format (12.345678, ' 6.2f '))
12.35
>> Print (Format (12.345678, ' 6.3f '))
>> Print (Format (12.345678, ' 6.3f '))
12.346
' M.nf ' indicates that M is the number of bits printed, and n is the number of digits after the decimal point
Print () percent of statistics
Print (Format (0.34567, '. 2% ')) printing percentile
Query Help
Help (Raw_input)
>> str1 = Raw_input ()
Www.11test.blog.51cto.com
>> Print str1
Www.11test.blog.51cto.com
>> type (STR1)
<type ' str ' >
>> age = raw_input (' Your Age: ')--Read all strings
You age:22
>> age = Int (age)----type converted to int
>> age = age + 1
>> Age
23
Print x, y--prints the values of X. and Y on one line
5. Variable resolution-no data type
Variables: variable amount, point to address change, same as C language pointer
X=12 x points to 12 of the deposit cells, changing the point of
Y=13 y points to 13 memory units
ID function, return memory address
6, learn some of the Python process
1. Fundamentals: Data type, Process control, modules, functions, iterators, adorners, recursion, iteration, reflection, object-oriented programming, simulation of life game development
2. Network programming: Socket C/S programming, twisted Network framework, web crawler development
Multithreading, multi-process, co-gevent,select/poll/epoll
Producer consumer model, distributed monitoring software development, Audit system development, FTP server development, Batch command, file distribution
3.web Basic Development
Html/css,dom programming, Native JS learning, jquery, Easyui,angulajs
Ajax asynchronous loading, Highchart drawing, Bootstrap
4. Algorithms & Design Patterns
Bubble, binary tree, hash, split half; Factory mode, singleton mode, enjoy meta mode proxy mode
5.py Web Framework
MVC architecture, self-developed a web framework, DJANGO/TORNADO/FLASK/BOTTLE/WEBPY Framework Learning
Session, middleware, ORM, Cookie, CSRF, FORM
RESTful API framework, Rights Management background development, BBS forum development, web chat room development
6. Project Combat
Shopping mall Development
Host Management + task Orchestration + operation and maintenance Audit Fortress machine development
Distributed class Nagios, Zabbix monitoring product development
Development of CMDB Asset management and IP/DNS resource pool management platform
Development of Web site access quality monitoring and analysis platform based on user perspective
OpenStack Two-time development
7. Some application and technical framework of Python
Python app
Web framework: Django,pyramid,bottle, Flask
Development software: Buildbot,trac,roundup
Operation Three Musketeers: Ansible,salt,openstack
Financial: Scipy,pandas,ipython
Code: UNICODE,UTF,HASHCODE,ASCII
Installation 3.0, installing the Pycharm-ide development tool: Setting Environment variables
Create a project
#!/usr/bin/env python
print "Hello World" 2.7
Print ("Hello World") 3.0
Assignment, variable
Name = "Alex Li"
Age = 21
Eval (' n '): Find n, take the value out
Print printing
Raw_input Keyboard Enter a string to assign the variable to str1
Len Stats How many characters are there
Python notes-Notes for the start phase