Detailed description of Python self-built logging module and python self-built logging Module
Easy to use
At first, we used the shortest code to experience the basic functions of logging.
Import logginglogger = logging. getLogger () logging. basicConfig () logger. setLevel ('debug') logger. DEBUG ('logsomething ') # output out> DEBG: root: logsomething
Step 1: Use the logging. getLogger function to obtain a
Python built-in type (3) -- Comparison, python built-in type
Python has eight comparison operators:,,>,>=,==,!=,is,is notThey have the same priority. Their meanings are as follows:
Operator
Description
Less
Less than or equal
>
Greater
>=
Greater than or equal
==
Equal
!=
Not equal
is
Whether the same objec
Python built-in functions (49) -- pow, python built-in 49pow
English document:
pow(
X,
Y[,
Z])
Return
XTo the power
Y; If
ZIs present, return
XTo the power
Y, Modulo
Z(Computed more efficiently
pow(x, y) % z). The two-argument form
pow(x, y)Is equivalent to using the power operator:
x**y.
The arguments must have numeric types. With mixed operand types, the coer
Python built-in functions (47) -- open, python built-in 47 open
English document:
open(File,Mode = 'R',Buffering =-1,Encoding = None,Errors = None,Newline = None,Closefd = True,Opener = None)
OpenFileAnd return a corresponding file object. If the file cannot be opened,OSErrorIs raised.
FileIs either a string or bytes object giving the pathname (absolute or relative to the current working directory) of the f
Python built-in functions (46) -- oct, python built-in 46oct
English document:
oct(
X)
Convert an integer number to an octal string. The result is a valid Python expression. If
XIs not a Python
intObject, it has to define
__index__()Method that returns an integer.
Note:
1. The function converts an integer to an octal string. If a floating point or string is
Python built-in functions (44) -- next, python built-in 44 next
English document:
next(
Iterator[,
Default])
Retrieve the next item from
IteratorBy calling its
__next__()Method. If
DefaultIs given, it is returned if the iterator is exhausted, otherwise
StopIterationIs raised.
Note:
1. The function must receive an iteratable object parameter. Each call retu
Python built-in functions (37) -- len, python built-in 37len
English document:
len(
S)
Return the length (the number of items) of an object. the argument may be a sequence (such as a string, bytes, tuple, list, or range) or a collection (such as a dictionary, set, or frozen set ).
Note:
1. The length of the returned object. parameters can be sequences (such as
Python built-in functions (67) -- zip, python built-in 67zip
English document:
zip(* Iterables)
Make an iterator that aggregates elements from each of the iterables.
Returns an iterator of tuples, whereI-Th tuple containsI-Th element from each of the argument sequences or iterables. the iterator stops when the shortest input iterable is exhausted. with a single iterable argument, it returns an iterator of 1
Python built-in functions (66) -- vars, python built-in 66 vars
English document:
vars([
Object])
Return
__dict__Attribute for a module, class, instance, or any other object with
__dict__Attribute.
Objects such as modules and instances have an updateable
__dict__Attribute; however, other objects may have write restrictions on their
__dict__Attributes (for example, classes us
Python built-in functions (63) -- super, python built-in 63 super
English document:
super([Type[,Object-or-type])
Return a proxy object that delegates method callto a parent or sibling classType. This is useful for accessing inherited methods that have been overridden in a class. The search order is same as that usedgetattr()Could t thatTypeItself is skipped.
The__mro__Attribute ofTypeLists the method resol
Python built-in functions (32) -- input, python built-in 32 input
English document:
Input([Prompt])
IfPromptArgument is present, it is written to standard output without a trailing newline. the function then reads a line from input, converts it to a string (stripping a trailing newline), and returns that. when EOF is read,EOFErrorIs raised
Note:
1. If the promat parameter is provided, the parameter v
For the use of Strut2's built-in Json plug-in, Strut2's built-in Json plug-in
Configuration notes:
Under the introduction of the original Struts2 framework jar package, an additional Json plug-in package (struts2-json-plugin-2.3.7.jar) needs to be added)
In the struts. xml configuration file, the package must inherit json-default and change the result type to json.
1. Let's take a simple example. Us
Common python built-in functions 1 and python built-in functions
1. abs calculates the absolute value.
>>> abs( -1 )1>>> abs( 1 )1>>>
2, max, min: calculate the maximum and minimum values of a sequence
>>> l = [ 1, 10, -6, 2, 100 ]>>> max( l )100>>> min( l )-6
3. len calculates the length of the list.
>>> s = 'ghostwu'>>> len( s )7>>> l = [ 10, 20, 30 ]>>> len( l )3>>> t = ( 10, 20 )>>> len( t )2>>> dic =
PHP built-in variable: directory_separator
Directory_separator is a PHP built-in command that returns the path separator associated with the operating system, returned on Windows, and returns on Linux or Unix-like, that's the difference. It is usually used when defining the include file path or uploading the save directory.
PHP treats all class methods that start with __ (two underscores) as magic methods.
On the domestic Internet of Things Platform (v)--Wit cloud IoT Internet of things cloud service platform and intelligent hardware self-help development platformMa ZhiPlatform positioning
The Smart Cloud Platform is an open platform dedicated to the Internet of things and intelligent hardware cloud services. The platform provides the ability to define pro
Liu FengArticle Introduction: The Internet and neurology are two distant areas, the relationship is far deeper and closer than imagined, the relevant theoretical and practical basis established in the past 10 years, so that the intersection of these two areas can produce a new subject in the 21st century- Internet Neuroscience (Internet neurology) One. Revolutio
(1) Servlet-related built-in objects: page and config
Page: Object type, which is rarely used.
The page object represents the JSP page itself, just like the this keyword in Java. More accurately, it represents the Servlet after JSP is translated. Therefore, it can call the method defined by the Servlet class.
Example:
Access the JSP page through a browser. The following output is displayed in the browser: test !!!
Config (master
Analyze data, view trends the best tool or report, the list of various data, a variety of graphic comparison, it is easy to analyze the trend and the status quo, for the Internet management, management is the most important goal, management is also to improve the efficiency of work online. Wfilter Series products, the report is a large module, to help your local area network to do the comparison, to do trend analysis, to complete your staff work on th
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.