Module Introduction
This section outlines:
- Module Introduction
- Time &datetime Module (Timing module)
- Random (stochastic number module)
- OS (System interaction module)
- Sys
- Shutil (file copy module)
- JSON & Picle
- Shelve (Package module)
- XML processing
- YAML processing
- Configparser
- Hashlib
- Subprocess
- Logging module
module, which implements a set of code for a function with a mound code.
Like functional programming and process-oriented programming, functional programming accomplishes a function, and other code is used to invoke it, providing reusability of code and coupling between the code. For a complex function, multiple functions may be required to complete (functions can be in different. py files), and the Code collection consisting of N. py files is called a module.
such as: OS is a system-related module; file is a module related to the operation of files
The modules are divided into three types:
- Custom Modules
- Built-in standard module (also known as standard library)
- Open source Module
Open Source Module Distribution Center: pypi.python.org (need to register, you can upload their own module of writing)
Download the installation:
Linux:
There are two ways to download the installation:
yumpipapt-get ...
Way One
Download source code to extract the source code into the directory compiled source python setup.py build installation source python setup.py install
Mode two
How to customize a module
Module calls prior to different directories
Reference http://www.cnblogs.com/wupeiqi/articles/4963027.html for the use of custom modules and open source modules
Detailed introduction See http://www.cnblogs.com/alex3714/articles/5161349.html
Python Learning Notes-basic "Fifth Week"-Common module learning