Author: vamei Source: http://www.cnblogs.com/vamei welcome reprint, please also keep this statement. Thank you!
The Python standard library is powerful for python and we have already introduced it in the previous article. The standard library involves a wide range of applications, so you need to learn background knowledge.
1. Computer Hardware principles
This part needs to be understoodMemory, CPU, and disk storageAndIoTo understand the functions and performance of computers and the concept of commands. These contents are basic and important.
A part of the python standard library is used to improveSystem Performance(Such as MMAP), so it is necessary to understand the performance of each component of the basic computer.
2. Operating Systems (especially Linux systems)
The following focuses on the operating system:
1) process management in the operating system, such as uid, PID, and daemon
2) signal communication between processes, such as using kill to transmit signals
LearningProcess ProblemsTo facilitate the learning of OS packages, thread packages, Multiprocessing packages, and signal packages.
3) File Management: several types of files.
4) file read/write (IO) Interface
5) file permissions and other file information (meta data)
6) Common system commands and applications, such as LS, MV, RM, mkdir, chmod, zip, tar ...,
LearningFile-relatedTo learn about the OS package, which is related to file management in the shutil package. The Learning file interface is very important for understanding the text input and output, and also affects understanding the concept of the socket package and select package. In addition, archive and compress functions in Python are similar to those in the operating system.
7)Linux ShellFor example, file name matching is helpful for understanding the glob package. If you have an understanding of the Regular Expression in Linux, it is easier to learn the Regular Expression in Python. Learning to PASS Parameters in Linux Command lines is also useful for understanding the packages that parse command lines in the python standard library.
3. Network Problems
A major application of python is in terms of network. However, Python and the standard library only provide interfaces and do not involve the underlying layer. Network knowledge can greatly reduce the steep learning curve.
1)TCP/IPBasic layered architecture
The content in this area is too extensive, so you can selectively understand the backbone knowledge.
2) common application layer protocols, suchHTTP, AndEmailRelated protocols, especially their work processes.
3) Learn as neededHtml/CSS/JavaScript/jquery/FrameAnd so on
If you want to use python to create a server, such as on Google App Engine, this knowledge is required.
4. Data Structure
The standard library defines encapsulation of some data objects. Their applications require someData StructureKnowledge, such as queue and tree. If you already know the data structure, this part of learning is not difficult.
5. Database
When using pythonDatabaseFor related packages (such as sqlite3), you must have a basic understanding of databases, especially relational databases.
6. Encryption and Text Encoding
I have no experience in this Part and dare not talk about it.
The last and most important thing is the basic PythonObjectConcepts andDynamic typeConcept. You can refer to the quick tutorial and try to read more information and source code to deepen your understanding of the concept. The difficulty of learning the python standard library lies in the background knowledge. A library that understands the background knowledge (or other languages)ProgramYou can master the basic Python library in a short time.