Configparser Module Introduction
Used to generate and modify common configuration documents (config file).
Configuration file format
A user profile is a collection of settings and files for the user to load the desired environment when the user logs on to the computer or when the user is using the software. It includes all user-specific configuration settings, such as program items, screen colors , Network Connections , printer connections, mouse settings, and window size and location. The general format includes Ini,cfg,xml, config and so on. The format of the configuration file is as follows
[DEFAULT] Serveraliveinterval = 45Compression = Yescompressionlevel = 9forwardx11 = yes [Bitbucket.org]user = HG [topsecret.server.c Om]port = 50022forwardx11 = no
Or
# A simple example with comments. [Bug_tracker]url = Http://localhost:8080/bugs/username = Dhellmann; You should not store passwords in plain text; Configuration Files.password = SECRET
Common operations
Build configuration file
Python Basics-Day 5 learning note-Standard library of modules: Configparser (10)