Here are 15 of the most popular open source frameworks that Bole has compiled online from GitHub. These frameworks include event I/o,olap,web development, high-performance network communications, testing, crawlers, and more.Django:python Web
1.1 Reading the configuration file-read (filename) reads INI file contents directly-sections () gets all the sections and returns as a list-options (section) gets all the option of the section-items (section) gets all the key-value pairs of the
One. Open Filef = open ("DB", "R", encoding= "UTF8")
R: Read-only
W: Write only, the file will be emptied first
A: Append
X: If file exists, then error, otherwise, create file and write only
B: The above parameters can be
#今天来学习一下函数, function# when defining a function, the function will not be executed, only the function will execute if it is called.## Defining functions# # 1, def is the keyword to create a function, create a function# # 2, Name of function# # 3, ()#
Regular ExpressionsThe approximate matching process for regular expressions is to take out the expression and compare the characters in the text, and if each character matches, the match succeeds; If a match is unsuccessful, the match fails.The RE
#__Author: "Skiler Hao"#date: 2017/2/15 11:06"""Mainly the use of test and practice time modulesTime consists of string format, timestamp, and structured time primitiveWed Feb 15 11:40:23 20171463846400.0Time.struct_time (tm_year=2017, tm_mon=2,
Due to certain requirements, it is necessary to send a Daily mail to the relevant personnel, including the day before the Zabbix monitoring graphics, log on daily and manually sent words is very troublesome.A simple repetition of the work to the
1 lists (list)The following code assigns a variable to a lista=['laay','aay','ay',' y']There are indexes in the list that can be indexed to access the values in the list, or you can complete the slices by indexingPrint (a[0]) Print (a[1]) Print (a[-
OutlineVariables and typesCommon string HandlingConditional judgmentLoop controlFunctionVariable and type basic variable typesFor Python all objects are class containers that inherit from object:Integer print (type (1234)) lists Print (Type ([1, 2,
Non-parametric adorners:Do not modify the original function, add the adorner, on the original basis of the wrapper function#!/usr/bin/env pythonImport TimedefTimer (fun):defWrapper (*args, * *Kwargs): Start=time.time () Res= Fun (*args, * *Kwargs)
Web Framework NatureAs we all know, for all Web applications, is essentially a socket server, the user's browser is actually a socket client.#!/usr/bin/env python#coding:utf-8 Import Socket def handle_request (client): buf = CLIENT.RECV (1024)
Objective:Python has a lot of components, sometimes the project depends on M components, and sometimes the project depends on N components, the time can easily lead to the system Python environment is bloated, thus has the virtualenv,
I. What is set Set is an unordered, non-repeating sequenceTwo. Create a set(1) se={"123", "456"}(2) li=[11,22,11,22]Se=set (LI)Then se={11,22}Description: Set is a class, and the class name () is the __init__ method that executes the class.Note:
Vamei Source: Http://www.cnblogs.com/vameiDefinition of a functionFirst, we'll define a function to illustrate the function.def Square_sum (A, b ): = a**2 + b**2 return CThe function is to find the sum of squares of two numbers.First, Def,
The super () function works according to the two parameters that are passed in:
The class name passed in by the first parameter determines where in the MRO is currently located. MRO (Method Resolution Order);
The current MRO list is determined by
The Magic method of Python is those predefined images in Python.
__XXX__Type of function.
The biggest advantage of using Python's Magic method is that Python provides a simple way for objects to behave like built-in types.
__str__
Python has been an object-oriented language since its inception, which is why it is easy to create a class and object in Python. The following article will give you a detailed introduction to the Python object-oriented programming knowledge points,
Chapter Content
Holle Word
Variable
Character encoding
User input
Module initial
Data type
Data operations
If......else
For loop
While loop
One, the first program Holle Word
#! /usr/bin/env python #-*-coding:utf-
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