Created on June 6, 2017 @author: louts1th Session Work 10minutesDisplay page, only login to display, not logged in will pop up a login box, is a masking layer2nd Course Automation Road and CMBD status 22minutes cmdb: automatic installation
The "1" getattr () function is Pythonthe core function of introspection"2" Python'sIntrospection: Python can view functions or module information stored as objects in memory, as well as related operations. "3" Related functions: GetAttr (), SetAttr (
About PythonPython is a programming language written by the famous "Uncle Turtle" Guido van Rossum during Christmas 1989 to send a boring Christmas.Python is an interpreted language.Interpreted language: The program is run by an interpreter, a
When using Python for interface testing, you can use the requests module, which is based on the Urllib, using the Apache2 Licensed Open Source Protocol HTTP LibraryInstalling Requests is a modulePIP Install requestsUse of the Requests moduleRequests
The user entered a non-compliant value, or the file that needs to be opened does not exist. These conditions are known as "exceptions", and a good program needs to be able to handle the exceptions that may occur, thus preventing the program from
Environment is Python 3Questions:Using the Binascii method has been error typeerror:a Bytes-like object is required, not ' str '# Coding:utf-8 Import 'worker'=print(b)#b = Binascii.b2a_hex (a)#typeerror:a Bytes-like object is required, not ' str
Virtualenv is a tool to create isolated Python environments.
Virtualenv is a tool for creating a standalone Python development environment that addresses the dependencies, versions, and indirect permissions of different Python projects on the
1, by crawling The history home page, to obtain the City address and the historical time, constructs the link;" "get city names and links across the country" "ImportRequests fromlxmlImportetreeImportRandomImportPymongo
One, save the data as a. json file1 # Data 2 with open ("./hmm.json",'w', encoding=' utf-8') as Json_file:3 json.dump (model,json_file,ensure_ ascii=False)4 Second, read the. json file1 # storing the Read data 2 with open ("./hmm.json",'r'
Reflection definition: Through string mapping or modifying the state, properties, methods of the program runtime.There are 4 ways to do this:1:getattr (Object,name,default=none): Gets the memory address of the corresponding method in the Obj object
Recently it took a long time to do this, because Deepin under python has two versions, and none of the pipis installed, the previous blog post is installed by default Pip Give python2.7 , the result of various problems, here will be the detour
When we open the path to a file, we should always be aware of the way absolute paths are represented, such as when opening a TXT file1,With open (' D:\77\111.txt ') as F:F.read ()This will be an error, the path is escaped by backslash D:? I.txtSolve:
The range of int python2: On a 32-bit machine, the number of integers is 32 bits, and the value range is -2**31~2**31-1;On a 64-bit system, the number of integers is 64 bits and the value range is -2**63~2**63-1;python3:Theoretically the length is
Quick sort:Select a datum in a set of data, let the data be divided into two parts, a portion is greater than the baseline, part is less than the baseline, and then this method to group two sections until no more points.A concept of recursive and
# Encoding:utf-8#公鸡5文钱一只, hen 3 cents A, chicken 3 only a penny, with 100 cents to buy 100 chickens,#其中公鸡, hens, chickens have to have, ask the rooster, hen, how many chickens to buy just just to fill 100 cents.# 5 3 1/3# 20>x>0 32>y>0 z>0# x+y+z=100
Here are a few other types of functions today: Synergistic functions, recursion, anonymous functionsDirectory:Co-process functionRecursiveanonymous functions1. The co-process functionThe generator expression was last put: a function that contains
Common MySQL operations in cmd and python, mysql#python
Environment configuration 1: Install mysql and add the bin directory of mysql to the Environment Variables
Environment configuration 2: Install MySQL-python in Python
Download and install the
Day1 job: Write login interface, day1 job writing Interface
Job 1: Compile the login interface
1. Enter the user name and password
2. The welcome information is displayed after the authentication is successful.
3. Lock after three wrong
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