Glob uses the Unix shell rule to find a file name that matches a pattern. This module is available whenever the program needs to find a set of files in the file system that match the name to a pattern.Glob pattern rules are not the same as regular
Django is the most popular web framework in Python, so what is called the framework, which helps you build the overall architecture of the program, and all we need to do is fill in the logic, and the framework can invoke the logic you write at the
1. When the shell script executes the Python script, you need to use the return value of the Python script to determine the command to be executed by the following program
Example: There are two py programs hello.py
Copy Code code as follows:
Consider the following Python code fragment. Do something with the data in the file, and then save the results back to the file:
Copy Code code as follows:
with open (filename) as F:
input = F.read ()
Output = do_something
Python uses the continue statement to jump out of the loop, and the break jumps out of the loop. The continue statement tells Python to skip the remaining statements of the current loop, and then proceed to the next round of loops. The continue
The general language provides a dictionary-sorted API, such as the need to use dictionary sorting when docking with a microblogging public platform. There are many algorithms for sorting by dictionary, the easiest way to think about is string search,
Implement a simple version of the Logging.config, support the general configuration through config file.A better way to feel is to use the Logging.config.fileConfig (Log_config_file) method to read it and modify the handler.
Copy Code code
Brief introductionInterested to see: Explanatory language + Dynamic type language + strongly typed languageInteractive mode: (mainly to test, you can try Ipython)
Copy Code code as follows:
$python
>>> print ' Hello World '
Recently, just looking for a Python database orm (Object relational Mapper), SQLAlchemy (Project homepage) This open source project has come to my attention, trying to use the Django ORM module, But the Django module is relatively close, not
Functional programming is the use of a series of functions to solve the problem, according to the general programming thinking, the face of the problem we think the way is "how to", and functional functional programming thinking is what I want to
Given the increasing number of servers in my hands, and sometimes the need to deploy the same file on a large scale, for example, because of the convenience of using the Systemtap tool to locate the problem, you need to have hundreds of servers
The effect chart is as follows:
Figure 1 (head picture cut to round, others transparent)
Figure 2 (Add an ellipse to the 4 corners of the picture)
I haven't dealt with it before, it's a bit laborious to deal with.
Modules to use:
Copy Code
1.TCP is a reliable connection-oriented protocol, before a party sends data, must establish a connection between the two sides, the establishment of the process requires three handshake, after the communication is completed to remove the connection,
Python is an increasingly popular scripting language today, it is simpler than Java, more powerful than PHP, and also applicable to the development of desktop applications, in Ubuntu, is a necessary script engine, so it is necessary to learn, the
Basic Custom Type
Copy Code code as follows:
C.__init__ (self[, arg1, ...]) builder (with some optional parameters)
C.__new__ (self[, arg1, ...]) constructor (with some optional parameters); typically used in a subclass that sets
Touch python time is not very long, recently a project needs to analyze data, and then choose Python as the programming language, in addition to language features, mainly focus on Python for SQLite3 database good support capabilities, because the
Use Python and numpy to process data more frequently, writing several small functions to easily read and write data:
#-*-Coding:utf-8-*-#----------------------------------------------------------------------# FileName: gettxtdata.py #功能:
In Python programming, you can use functions to define some programs that need to be called repeatedly, in basic form:
def function name (parameter 1, Parameter 2, ..., parameter n):
The execution statement function name is the representation name
The INI file is a frequently used configuration file in Windows, and the main format is:
Copy Code code as follows:
[Section1]
Option1:value1
Option2:value2
Python provides a simple module configparser can be used to parse
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