OS module is also our usual work in a very common to a module, through OS the module calls the system command, obtains the road strength, gets the type of the operating system, and so on is using the module. 1. Get the system typeExample:>>> Import
Methods for exchanging values of two variables in PythonUse third-party variables:" " This is the first method of assignment, with a third-party variable " " = = = CUse two variables:" " use of two variables " " = a+b # takes two number of and B =
ObjectiveIn short, the Internet is a site and network equipment made up of a large network, we visit the site through the browser, the site to the HTML, JS, CSS code back to the browser, the code through the browser parsing, rendering, the colorful
In Python, encoding and decoding is actually the conversion between different encoding systems, by default, the conversion target is Unicode, that is, encoding unicode→str, decoding str→unicode, where Str refers to the byte stream, While Str.decode
Reference manual: Https://fossies.org/dox/scapy-2.3.3/When a host sends an Ethernet data frame to another host located on the same LAN, the destination interface is determined based on the Ethernet address of the 48bit.The device driver never checks
The goal is to crawl all the data on the http://www.gg4493.cn/home page to get the name, time, source, and text of each news article.Next, break down the target and do it step-by-step.Step 1: Crawl all the links on the home page and write to the
This script depends on the port to determine whether the process is alive, if there is a specified port to prove that the process is not a problem, if the port is not detected that the business process has been hung up, at this time automatically
Start the Python learning path, the Daily record of the incomeVariable definition rules:The first character of a variable name cannot use a number, and the variable name can only be any combination of letters, numbers, or underscores.Two ways to
An algorithm is a concrete and effective procedure for solving a problem.The complexity of the algorithm, indicating the operating efficiency of the code, denoted by an uppercase o parenthesis, such as O (1), O (n)It is considered that the
Reference manual: Http://phaethon.github.io/scapy/api/usage.htmlScapy is a library of Python that provides the construction of network protocols, requests, etc.Scrapy is Python's reptile framework.Three levels:1. Understanding the Agreement2.
Http://www.runoob.com/python/python-func-map.htmlMap () function syntax:Map(function, iterable,...) Parameters
Function--functions, with two parameters
Iterable--one or more sequences
>>>def Square (x): # squared count ... return x *
One, OS moduleImport OS, sysOs.system (' ipconfig ') #执行操作系统命令, get no results returnedOs.popen () #也可以执行操作系统命令, can return command execution result, but need read outPrint (Os.popen (' dir '). Read ())Second, sys modulePrint (SYS.ARGV)
Environment installation, pythonday01 EnvironmentBuild Environment
1. win10_X64. Other Win versions are also supported.
2. Install python. ()3. PyCharm version: Professional-2016.2.3.Install Python on Windows
First, based on your Windows version (64-
Python3 basic syntax (4), python3 basic syntax1, encoding
By default, the Python 3 source code fileUTF-8Encoding. All strings are unicode strings. Of course, you can also specify different codes for the source code file:
1 # -*- coding: cp-1252 -*-
2
Process and thread, process thread
Reference blog: http://blog.csdn.net/zheng548/article/details/546699081. Multiple programs
Multi-channel programming technology is the first technology introduced by the operating system. It is designed to allow
Pyhton3 string self-record and Pyhton3 string record
>>> Para_str = "is an instance with multiple-line strings. You can use a TAB (\ t) for multiple-line strings ). You can also use the line break [\ n]. ">>> Print (para_str) is an instance of multi-
Django case 1 (blog): 6. Develop the blog content page, djangoblog
Purpose: To display the specific content of a blog. You can return to the blog homepage for comment.
1. edit a route
A blog must be identified with a unique identifier. By default,
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