The configpraser of the Python moduleI. Configpraser INTRODUCTION The file used to process a particular format, essentially using open to manipulate the file.Format of the configuration file:Use "[]" to include configuration content similar to
Vamei Source: Http://www.cnblogs.com/vamei Welcome reprint, Please also keep this statement. Thank you!An adorner (decorator) is an advanced Python syntax. Adorners can be used to process a function, method, or class. In Python, we have several
CommentsSingle line: #Multiple lines: 3 consecutive single or double quotes on top and bottom3 Quotes In addition to multiple lines of comment, you can also print more than one lineExample:msg = name = (name) (msg)Running the result the second print
Q1QuestionWant to ask a question, the following words, how to achieve the line?Answer: for line wrapping in HTMLQ2:QuestionTeacher, would like to askWhat's in this idea?AnswerPycharm's engineering files, the configuration information for the project,
Official website: http://nuitka.net/doc/user-manual.htmlPython packaging Tool Comparison: http://blog.csdn.net/qwemicheal/article/details/52864656 This blog explains the various problems that Nuitka existIntroduction to ELF Format:
PIL: is the abbreviation of the Python Image Library, the module of the graphics processing. Image,imagefont,imagedraw,imagefilterImage module:Common methods:Open ()#Open PictureNew (Mode,size,color)#Create a new pictureSave ("Test.gif","GIF")#Save (
The navigation site search results of the page http://www.dmoz.org/Computers/Programming/Languages/Python/Books/inside the title, and the title of hyperlinks and descriptions crawled down.It takes four steps to crawl a website using scrapy.---Create
Python file operations
It's a lot easier to do than files in Java,python.Python Gets the folder where the current file resides:Os.path.dirname (__file__)Wrote a tool class to generate files under the current folder, so it's easy toclass Util ():
Learn about the history of Pyhton.Mount Python (python)An interpretive, object-oriented, high-level programming language with dynamic semantics.1989. Christmas in Amsterdam.A fan of the circus.The development stage of Python.Cnri period,Beopen
First, let's look at the simple matching of strings.
It can be imagined that the text string s is fixed, the pattern string p from the left edge of the alignment, if the alignment of the part is exactly the same, then the match succeeds, the
Take the calculation of NDVI as an example:
Ndvi= (nir-red)/(nir+red)
Where Nir is band 3,red is band 2
The programming points are as follows:
1. Read Band 3 into the array data3 and read Band 2 into the array data2
2. The calculation formula is:
3.
Create an empty Geometry object: ogr. Geometry
Defining different ways to use geometry is not the same (point, line, polygon, etc)
Create a new point, using method Addpoint (, , []). where the z-coordinate is generally omitted, the default value is
Python IDE
This article recommended several good Python IDE (integrated development environment), compare recommended Pycharm, of course, you can choose the right one for your own Python IDE.
Pycharm
Pycharm is a python IDE created by
Inlinemodeladmin
Class InlinemodeladminClass TabularinlineClass Stackedinline
For example, there are two model:
From django.db import ModelsClass Author (models. Model):Name = models. Charfield (max_length=100)Class book (Models. Model):Author =
1. The life cycle of the Django requestRouting System--try the function (get template + data = "render), and return the string to the user2. Routing System/index/, function or class. as_view ()/detail/(\d+), function (parameter) or class. as_view ()
Vamei source: Http://www.cnblogs.com/vamei Welcome reprint, Please also keep this statement. Thank you!In the quick tutorial, we learned about the most basic sequence (sequence). Recall that the sequence contains a fixed value table (tuple) and a
Background:In the execution of some Python scripts, the process of executing the script often occurs, do not know how much the script executes, this problem has always been very vexed to ME. So deliberately summed up, the progress of the preparation
Files: Practise2.tarExercise: Multilevel Menus
Level three Menu
Select Menu
Lists and data dictionaries
#!/usr/bin/env python#Author:austindefmatch_name (level): _file= Open ("Dictionary.txt","R") line=_file.readline ()
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