Linux development environmentOne, install VMware Workstation on WindowsBaidu search VMware Workstation download and installInstall the CentOS system on virtualized VMware Tools and telnet to CentOS with Putty (with python2.7)Second, install Python
First, reflection1, the basic introduction of reflection:Reflection is the proper noun of all programs, and there is reflection in the java,c# language, so what is reflection?The reflection in Python is generally: importing the module in the form of
The reason for Python to selfThere is an obvious difference between the methods of a Python class and the normal one, in which the method of the class must have an extra first argument (self), but you do not have to assign a value to this parameter
Ubuntu 16 has been automatically installed Python3. All you need to do is install the Python editor sudo apt-get install Idle3.Open IDLE, copy the following code below and press ENTER.Print ("Hello, world!") To create a file in the IDLE, go to File >
List and tuple are Python's built-in ordered set, one variable, one immutable. Choose to use them as needed.1. Built-in data type, List>>> appleversion = [' Apple1 ', ' apple2 ', ' apple3 ']>>> appleversion[' apple1 ', ' apple2 ', ' Apple3 ']> >>
Description1. Seems to be the agent of this website http://www.xicidaili.com/2.2nd, 3 lines of the module is not imported, the previous forgot to delete.3. http://www.whatismyip.com.tw/This site can view the native IP4. Specify the agent, create the
Description1. Import three modules, Urllib.request.urlopen is used to open the URL link, urllib.parse the UrlEncode method to convert the data object in the browser network to the second parameter of Urlopen data,json.loads () method to convert the
Outputby print() Adding a string to the parentheses, you can output the specified text to the screen. For example ‘hello, world‘ , the output is implemented in code as follows:>>> print(‘hello, world‘)print()A function can also accept multiple
Cause:python3.4 is compiled with msvs2010, so python3.4 can only recognize msvs2010 by default.python2.7 is compiled with msvs2008, so python2.7 can only recognize msvs2008 by default.Method One: Install MinGW (not recommended)Download MinGW
This article mainly introduces the Linux e-mail disk space monitoring function, Python implementation, the need for friends can refer to the following
Core code:
#!/usr/bin/python#-*-coding:utf-8-*-import smtplibimport osimport commands,time from
We all know that the basic usage of else in Python is the if...elif...else in the conditional control statement ..., but else there are two other uses, one for the end of the loop and the other for the error-handling try. This was originally the
The dictionary tree (Trie) can hold the corresponding relationship of some string--value. Basically, it's the same as Java's HashMap function, all key-value mappings, except that the Trie key can only be a string.
The strength of Trie lies in its
Add dictionary merge values
In the statistical summary of the game data, some of the data is stored in a dictionary every day, when I want to summarize the multi-day, I need to merge the dictionary.If key is the same, their values are added.The
Supplement of 0017 _ set, supplement of 0017 _ set
1. Type:
List: Allows repeated sets and can be modified.
Tuple (tuples): Repeated sets are allowed and cannot be modified.
Dict (dictionary)
Set: Duplicate sets are not allowed.
Set
Web framework and web Front-end framework
Preface: Today I wrote a blog to briefly introduce the web framework. The next blog will introduce the django framework ~~
1. WSGI
As we all know, all Web applications are essentially a socket server, and
On SQLAlchemy ORM of python, sqlalchemyorm
Preface:SQLAlchmey was learned during the summer vacation. After completing the course, I did not write my blog in time. This blog mainly introduces SQLAlchemy and basic operations. After writing this
Basic usage of iPython and notevook, ipythonnotevook
1 install Ipython
Pip install ipython
2 Basic Notebooke usage
Start ipython and use ipython
Start notebook to use ipython notebook
3 Remote use of Ipython notebook configuration method
Download pycharm and pycharm
To learn the python language, You must select a programming tool. I also learned about this. There are many python development tools, including the built-in IDLE and pycharm. Currently, these two types of materials are
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