Configparser Basic Use
Reading configuration Files-read (filename) directly read the contents of the file-sections () Gets all of the section and returns in the form of a list-options (section) gets all option for this section-items (section) gets
Crawl QQ space and so on most of the pages need to login, research QQ login rules, have to analyze a large number of JavaScript encryption decryption, this can definitely drop a few pounds of hair. And now with the Selenium tool, MA Ma no longer
Polymorphism is a basic feature of object-oriented language, and polymorphism means that variables do not know what the referenced object is, and behave differently depending on the object of reference. When dealing with polymorphic objects, you
Numeric type: integer (int), long Integer (length), floating-point number (float), plural (complex), no need to specify numeric types when defining variables, such as: A=1, a=12.5
Operators: In addition to subtraction and powers * *, Division/,
A python conditional statement is the execution result (true or false) of one or more statements that determines which block of code is executed
The Python program language specifies that any non-0 and non-null (NULL) values are true,0 or null to
The collection in Python has two main functions, one is to establish a relationship, the other is to eliminate duplicate elements
The format of the collection is set (element)
Take a concrete look at the following actions.
>>> e = set
To get time related information, to use the Python timer module, there are many very useful features in the Python time module, you can go to the official document to understand the current time, to get the time stamp of the current time, the
Because of some irresistible factors, Python's official packages are sometimes inaccessible or network-unstable in the country. To solve this problem, you need to modify the source address from the PIP to the mirrored address.
The better mirrored
The recent project uses Python to process the output file, need to use the image module to deal with the picture, the default installed Python is not with the image Library, installation PiL Image Library is very simple, share the ~
If JPEG and
The Easy_install command may be used in Python when you need to install a Third-party python package. Easy_install is a command from the Setuptools package developed by Peak (Python Enterprise application kit), so use Easy_ Install is actually
Principle of progress bar implementation
What is the difference between a progress bar and a regular print?The answer is that print prints a \ n, a newline, so that the cursor moves to the beginning of the next line, and then the output, which is
Before writing a shell to generate random passwords, in order to follow more automation, part of the work has been transferred to the automation of Python processing, so many of the original shell tools have to be transformedThe following is written
Scene
Implements a Python invoke Java interface, which is provided in HTTP. In order to achieve a more comfortable invocation, I am not going to call this way with send ({"method": "Echo"}), but rather api.echo ()
But Python doesn't provide
I like to use code to understand the program, not the tutorial alone.Class ThreadClass inherits from Threading. Thread, and because of that, you need to define a run method that executes the code that you want to run in that thread. The only thing
In the py2.7 project with the __future__ module in the Unicode_literals to prepare for compatible py3.x, today encountered a unicodeencodeerror error, followed, found that this small pit is worth noting. What kind of a pit is it? Follow the code to
Algorithm principle
Algorithm One
1) will be long Web site MD5 generated 32-bit signature string, divided into 4 paragraphs, 8 bytes per paragraph;2 to the four-segment loop, take 8 bytes, consider him as 16-string and 0X3FFFFFFF (30-bit 1) and
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service