GUI graphical interface1.wxpythonGUI programming framework under Python, similar to MFC's architecture: http://wxpython.org/download.php2. PyQtQT Development library for Python: Http://www.riverbankcomputing.com/software/pyqt/downloadWeb Framework1.
There are many places in the program that require random characters, such as random verification codes for login sites, and random strings can be easily generated by the random module.>>> Random.randomrange (1,10)#returns a random number between 1-10
Time & DateTime ModuleIn the usual code, we often need to deal with time. In Python, the modules related to time processing include: Time,datetime,calendar (seldom used, not spoken), as described below.Before you begin, here are a few things to note:
1, Concept: Iterable and IteratorIterable indicates that the variable can be iterated by for in.Iterator indicates that the variable can be iterated by next (O)(The previous represents a finite iteration, and the next represents an inert iterative
1 str1='let's go'2 " ", line 13 str1='s Go'4 ^5 syntaxerror:invalid syntaxBecause str1 inside has "'", so the compiler can not escape and error, the correct code is as follows str1='let\ ' Go'str1' Let'sgo 'Use \ as escape
num + = 1 is equivalent to num = num + 1Num-= 2 is equivalent to num = num-2Num *= 3 equivalent to num = num * 3Num/= 5 is equivalent to num = NUM/5Num//= 7 equivalent to num = num//7Num%= 8 equivalent to num = num% 8Num **= 9 equivalent to num =
python text method rollup that handles each character of a string individually Scene: Process a string in a single character per process Method: 1. use list ( str ) >>>a=' ABCDEFG ' >>>List (a) [' A ', ' B ', ' C ', ' d ', ' E ', ' F ',
Code#Tkinter Base Add a button, display text on the button, and set the text colorImportTkinter as TK#Object-Oriented programmingclassApp ():def __init__(self, Master): Frame= Tk. Frame (Master)#frame?? I don't understand .Frame.pack ()#Create a
Regular Expressions OverviewRegular expressions, also known as formal representations, formal representations, regular expressions, regular expressions, and conventional representations (English: Regular expression, often abbreviated in code as
Python file and Directory operations summary:1. Python OS Module basic commandsHeader fileImport # provides an interface to invoke the operating system OS Common directives1OS.GETCWD ()#gets the current working directory, which is the directory path
1. Modifying elementsTo modify a list element, you specify the list name and the index of the element that you want to modify, and then specify the new value for the element.1 list1 = [0,1,2,3,4,5]2print(list1)34 list1[0] = 1 # the first element
PyPI Registration and ConfigurationOn PyPI's official website: https://pypi.python.org/pypiSign up for your accountAfter activating the account, we also need to configure a file locallyTo create a file at the user's root directory:.pypircEnter your
Module
Support methods
Description
Json
Dumps/dumpLoads/load
Only basic data types can be processed;For the transmission of data between multiple languages;
Pickle
Dumps/dumpLoads/load
XML processing: PIP3 Install lxmlText Processing: PIP3 Install requestsOPENSSL:PIP3 Install Pyopenssltwisted:https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted Download TWISTED-17.9.0-CP36-CP36M-WIN_AMD64.WHL to D packing directory;Rename to:
If/while/forSyntax for the Enumerate () method:Enumerate (sequence, [start=0])Sequence--a sequence, iterator, or other supporting iteration object.Start-the subscript start position.List index corresponding valuesIf条件判断if 判断条件:执行语句elif 判断条件:执行语句else:
When operating system maintenance, the SSH command is usually connected to the remote server for some operations. How to do this in Python, of course, can also execute SSH commands, but there is a more elegant way, with the help of Paramiko, which
Bool, if, while, randint, boolrandint
1. bool Value
This seems understandable. There are comparison operators, and logical operators all generate bool values. First, let's look at these. This is true or false in Middle School Mathematics questions
Start learning python and learn python
I don't want to stay in my own small room after work. I doubt my life. Therefore, I chose python
Why is it?
I have had such an idea... The world does not regret it. It is not too late now. Keep moving
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