1. dll Concept
DLL (Dynamic linkable Library), which can provide some functions, variables, or classes to the program. These can be used directly.
Differences between static and dynamic libraries:
(1) Both static and dynamic libraries share code.
Logging Module Introduction
Python's logging module provides a common logging system that can be easily used by third-party modules or applications. This module provides different log levels and can record logs in different ways, such as files,
Formatter = logging. formatter (% (asctime) s % (levelname) s % (message) s, % Y % B % d-% H: % M: % S) the above % Y and so on are time formats, so to understand the above, let's first look at the Python time format. % A-abbreviatedweekdayname
This article mainly introduces how PHP can automatically identify the types of returned content of RestfulAPI, and automatically render the content into json, xml, html, serialize, csv, php, and other data formats for output, for more information,
#很多程序都有记录日志的需求, and the information contained in the log is a normal program access log, there may be errors, warnings and other information output, Python logging module provides a standard log interface, you can store the log in various formats,
Module-level functionsLogging.getlogger ([name]): Returns a Logger object that returns root if no name is specified loggerLogging.debug (), Logging.info (), logging.warning (), Logging.error (), logging.critical (): Set the log level for root
Python programming Quick Start Chapter 1 practical project reference answers, python Quick Start
This chapter describes how to debug the python program. When the program has bugs or exceptions, how can we debug the code to
Reference: http://blog.csdn.net/zyz511919766/article/details/25136485Logging moduleThe log has 5 levels, debug,info,warning,error,critical, respectively, and the corresponding level numbers are 10,20,30,40,50Output log standards to the
Detailed description of the logging module and logging
Many programs need to record logs every day. In addition, the information contained in the logs contains normal program access logs, and may also have errors, warnings, and other information
SYS moduleThe SYS module provides a series of variables and functions for the Python runtime environment.1 #重点记忆2 sys.argv #命令行参数List, the first element is the program itself path 3 sys.exit (n) #退出执行的程序未见, exit normally exits (0),
Many programs have logging requirements, and the log contains information that has normal program access logs, there may be errors, warnings and other information output, Python's logging module provides a standard log interface, you can store
OS ModuleOS.GETCWD () Gets the current working directory, that is, the directory path of the current Python script work os.chdir ("DirName") changes the current script working directory, equivalent to the shell Cdos.curdir return the current
Tag: ASI Digital SED Family Current time Open open mode change TedLoggingFunctional Simple ConfigurationImport LoggingLogging.debug ('debug')Logging.info ('info')Logging.warning (' wrong ')logging.error ('error message'Logging.critical ('critical
1. By default, Python's logging module prints the logs to standard output and only displays logs that are greater than or equal to the warning level, indicating that the default logging level is set to warning (log level level critical > ERROR >
One, log levelThe log is divided into 5 levels, from low to High, respectively: DEBUG INFO WARNING ERROR CRITICAL.DEBUG: Detailed information, usually appearing only on diagnostic issuesINFO: Make sure everything works as expectedWARNING: A sign
I. Hashlib module Python's hashlib provides a common digest algorithm, such as MD5,SHA1 and so on.Abstract the algorithm is also called hash algorithm and hashing algorithm. It uses a function to convert any length of data into a fixed length data
Recently modified the logging related functions in the project and used the logging module in the Python standard library to make some records here. Mainly from official documents and StackOverflow to find some of the content.
Official
Flask How to use logging:
Initializing Flask Application Instances
Using logger in flask requires initializing an flask applicationApp = Flask (__name__)2. Call LoggerCalling the Logger method directlyApp.logger.info ("My first Logging"
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.