Key Summary:Server: Running (while true), listening for a port on a running machine (IP), multi-threaded or multi-process receive client socket requestClient: Unsolicited request, need to know the IP and port of the serverService side:#-*-Coding:utf-
Use Python today. However met Traceback (most recent the last): error. A stroke of madness. There is said path is wrong, there is said to be ... There is very little information on the Internet. Then I suddenly found that the elements on the page I
L Old Boys Training-python training Phase two Lesson01 (11 knots)01-First day content introduction and pre-class thinking02-python Introduction and development03-python Development04-python Installation05-python Programming Style06-raw_input User
1. The special member method of the class 1.1__doc__ represents the description information of the class1.2__module__ and __class____MODULE__ represents the object of the current operation in that module__CLASS__ represents the class to which the
The first thing to make clear before installing pyquery is that Easyinstall is a Python package manager, similar to node's NPM, for installing Python's expansion pack, which installs packages in a *.egg way.To install the PQ you need to go through
1. Operators and their usage
operator
name
Description
Example
+
Add
Two objects added
3 + 5 get 8. ' A ' + ' B ' gets ' ab '.
-
Reducing
Get negative numbers or one
ObjectiveCurrently the selenium version has been upgraded to 3.0, and most of the online tutorials are based on 2.0, so it is important to understand the version number before learning. The series is still based on selenium2, the current selenium3
Today we have a problem:When I execute the following code, I find that the file is only half written. That is, when the file size is too large, the following code does not guarantee that the file will be written correctly.FD = open ('test.txt','w')
python-built-in functions-int: Converting a string to a number" 123 " Print (Type (a), a)b = int (a)print(type (b), B)" 0011 " = int (num, base=16)print(v)-bit_lenght:# The binary of the current number, at least n bitsage=5= age.bit_length
First, the functionA=1, b=2, Exchange valueDefines the c,c=none of the intermediate volume,A,b=b,aa,b,c=1,2,3sys.argvImplements certain functions specified, can be called directly when used, simplifies code, improves code reusabilitydef fun ():
1. The following built-in functions (built-in function) can be used for sequences (table, Fixed value table, string): S is a sequence
Len (s) returns: the number of elements contained in the sequence
MIN (s) returns: the smallest element in a
Standard module DateTime in Python can convert a string to a date
Python code
From datetime import datetime
Text = ' 2012-09-20 '
y = datetime.strptime (text, '%y-%m-%d ')
Print (y)
z = DateTime.Now ()
diff = Z-y
Print (diff)
Output by a
The Python continue statement jumps out of the loop, and break jumps out of the loop.
The continue statement is used to tell Python to skip the remaining statements of the current loop, and then proceed to the next round of loops.
The continue
API Description--Download gsextractor content Extractor
1, Interface name
Download content Extractor
2, Interface description
If you want to write a web crawler, you will find that most of the time spent on debugging Web content extraction rules,
Usually write python will often want to get the script in the directory, such as a file with the script file in a relative directory location, it can be found in the script file directory to the corresponding file, even if the script file moved to
Python data type --- Boolean & string, python Data Type
Python data type ----- Boolean
True or false => 1 or 0
>>> 1 = TrueTrue >>> 0 = FalseTrue
Python data type ----- string
String formatting output: print function Format in python3: print ()
Summary of multi-process and multi-thread Concurrency Control in Python, and multi-thread in python
I. Preface
I originally wrote a script for brute force password cracking, but I tried a password for 2220000 passwords in one second. I want to use
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