This time I updated a majority of the functions, which were developed in the form of an app.
Added the blog classification function; blog follow and recommendation function (Ajax implementation)
Added the second-level channel function.
More
1. If A = input () A = int (a) B = input () B = int (B) If A> B: Print (STR (a), "big") else: if (A
If you do not need (), write the judgment condition directly, and then follow a colon (:), else is also followed by a colon
If no {} indicates
Python's simplehttpserver module allows you to quickly create a temporary Web server on the local machine. Run the following command: Python-M simplehttpserver, so that a Web server is open. The default port is 8000. If you want to change the port,
The Zope. interface module must be installed when twisted is installed. After downloading the module, it is found to be egg. I do not know how to install it. I found setup tools on the Internet. The following records.
Install setup
1. acceleo is a model-driven architecture (MDA)CodeThe Automatic Generation Tool, acceleo can convert the model to Java, C #, PHP and other code. Acceleo is open based on the eclipse platform and EMF (eclipse model framework ).Source code.Http://www.
Anyone who has worked as knows that when writing an as project, we can import a class, just according to the relative directory of the main portal document class. For example, if B. As is in the com. isflash. UI package of Main. As, I want to import
I think Google online translation is quite useful. If I want to write a small tool, I can use it locally. I found two tools on the Internet that are not very useful (using python to call Google translation; using Google translation for Python ),
Now
_ Call __
There is an interesting syntax in Python. This type becomes callable when the _ call _ function is implemented when the type is defined.
In other words, we can use this type of object as a function, which is equivalent to overloading the
Document: Python official DOC: 20.15. UUID-UUID objects according to RFC 4122 UUID algorithm Introduction: A universally unique identifier (UUID) urn namespace Overview: UUID is a 128-bit globally unique identifier, it is usually represented by a 32-
Bisect in python is used to operate the sorting array. For example, you can insert data into an array and sort the data at the same time. The following code demonstrates how to operate:
import bisectimport randomrandom.seed(1)print('New pos contents'
Shared memory is the simplest way to communicate between processes. It allows multiple processes to access the same memory. After a process changes its data, data changes can be seen in other processes.
Shared memory is the fastest way to
Environment Apache + mod_python
This method can be used if the file size is small.
Import OS
Def form ():Return """\ file: """
Def upload (req ):Try: # windows needs stdio set for binary mode.Import msvcrtMsvcrt. setmode (0, OS. o_binary) #
Python uses underlines as the prefix and suffix of variables to specify special variables.
_ XXX cannot be imported using 'from module import *'_ XXX _ system definition name_ Private variable name in XXX class
Core style: Avoid using
Python operation CGI (Environment: XP system + IIS + ptython2.7.3 + CGI)1. First, we need to configure IIS. Of course, you can configure other ones. Here I select IIS.
There are not many steps to configure IIS. Here we provide a solution for
Among the various language platforms, the Web frameworks that emerged in Python are probably the most; the conjecture should be that the framework constructed in Py is very simple and the wheel is constantly invented.
Here we will describe the two
1. Operators
Operator
Name
Description
Example
+
Add
Add two objects
3 + 5 get 8. "A" + "B" get "AB ".
-
Subtraction
Returns a negative number or a number minus another number.
-5.2 returns a
Official documentation: Http://docs.python.org/library/ OS .path.html
Reprinted from: http://www.redicecn.com/html/Python/20110507/273.html
OS. Path. abspath (PATH)
Returns the absolute path of path normalization.
>>> OS .path.abspath('test.csv
Test Boundary Conditions
Testing the edgesWhen we write automated tests, we pick the inputs and assert the expected outputs. It isImportant to test the limits of the inputs to make sure our code can handle good and badInputs. This is also known as
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