Detailed explanation of Python development technology

Detailed explanation of Python development technology

Detailed explanation of Python development technology download address pan.baidu.com/s/1KTrk3B1s... Scan the QR code below and follow the public account to reply 100089 to obtain the sharing code. The directory structure of the book is as follows: The first python language basics Chapter 1 python overview 1.1 python introduction 1.2 python characteristics 1.3 the first python program 1.4 build development environment 1.4 .1 Download and installation of python 1.4.2 How to use interactive command line 1.5 How to use python development tool 1.5.1 How to use pythonwin 1.5.2 How to use eclipse ide integrated development environment 1.5.3 Editplus editor environment configuration 1.6 Python under different platforms 1.7 Summary Chapter 2 The Basic Grammar of Python 2.1 File Types of Python 2.2 Encoding Rules of Python 2.2.1 Naming Rules 2.2.2 Code Indentation and Colons 2.2.3 Specification of Module Import 2.2.4 Use Blank Lines to Separate Code 2.2.5 Correct 2.2.6 Separation of Statements 2.3 Variables and Constants 2.3.1 Naming of Variables 2.3.2 Assignment of Variables 2.3.3 Local Variables 2.3.4 Global Variables 2.3.5 Constants 2.4 Data Types 2.4.1 Numeric Types 2.4.2 Characters String Type 2.5 Operators and Expressions 2.5.1 Arithmetic Operators and Arithmetic Expressions 2.5.2 Relational Operators and Relational Expressions 2.5.3 Logical Operators and Logical Expressions 2.5.4 Priority of Operators 2.6 Summary No. 3 Chapter Python Control Statements 3.1 Structured Programming 3.2 Conditional Statements 3.2.1 If Statements 3.2.2 If...elif...else Statements 3.2.3 Nesting of If Statements 3.2.4 Realizing the Function of Switch Statements 3.3 Loop Statements 3.3.1while Loop 3.3.2 For loop 3.3.3 Break and continue statement 3.4 Structured program example 3.5 Summary Chapter 4 Built-in data structure 4.1 Tuple 4.1.1 Creation of tuple 4.1.2 Access of tuple 4.1.3 Traversal of tuple 4.2 List 4.2.1 The creation of the list 4.2.2 The use of the list 4.2.3 The search, sorting and reversal of the list 4.2.4 The use of lists to implement stacks and queues 4.3 The creation of a dictionary 4.3.1 The creation of a dictionary 4.3.2 The access of a dictionary 4.3.3 Dictionary method 4.3.4 Sorting and copying of dictionary 4.3.5 Global dictionary-sys.modules module 4.4 Sequence 4.5 Summary Chapter 5 Modules and functions 5.1 Structure of python program 5.2 Module 5.2.1 Creation of module 5.2.2 Module Import 5.2.3 Module attributes 5.2.4 Module built-in functions 2.5 Custom packages 5.3 Function 5.3.1 Function definition 5.3.2 Function parameters 5.3.3 Function return value 5.3.4 Function nesting 5.3.5 Recursive function 5.3.6 lambda function 5.3.7 generator function 5.4 summary Chapter 6 Strings and regular expressions 6.1 String manipulation 6.1.1 String formatting 6.1.2 String escape characters 6.1.3 String merging 6.1.4 Interception of character strings 6.1.5 Comparison of character strings 6.1.6 Reversal of character strings 6.1.7 Search and replacement of character strings 6.1.8 Conversion of character strings and dates 6.2 Regular expressions 6.2.1 Regular expressions Introduction 6.2.2 Use the sys re module to process regular expressions 6.3 Summary Chapter 7 File processing 7.1 Basic file operations 7.1.1 File opening or creation 7.1.2 File reading 7.1.3 File writing 7.1.4 Deletion of files 7.1.5 Copying of files 7.1.6 Renaming of files 7.1.7 Finding and replacing file contents 7.1.8 Comparison of files 7.1.9 Accessing configuration files 7.2 Basic operations of directories 7.2.1 Creating and replacing directories Delete 7.2.2 directory traversal 7.3 files and streams 7.3.1 python stream objects 7.3.2 simulation of java input and output streams 7.4 file processing example-file attribute browser program 7.5 summary Chapter 8 object-oriented programming 8.1 overview of object-oriented programming 8.2 Classes and Objects 8.2.1 Differences between Classes and Objects 8.2.2 Definition of Classes 8.2.3 Creation of Objects 8.2.4 Architecture of Python Objects 8.3 Properties and Methods 8.3.1 Properties of Classes 8.3.2 Methods of Classes 8.3.3 Use of internal classes 8.3.4 __init__ method 8.3.5 __del__ method 8.3.6 garbage collection mechanism 8.3.7 built-in methods of classes 8.3.8 dynamic characteristics of methods 8.4 inheritance 8.4.1 Use inheritance 8.4.2 Simulation of abstract classes 8.4.3 Polymorphism 8.4.4 Multiple inheritance 8.4.5 Better inheritance 8.5 Operator overloading 8.6 Python and design patterns 8.6.1 Introduction to design patterns 8.6.2 Design Pattern example-python implementation factory method 8.7 Summary Chapter 9 Exception Handling and Program Debugging 9.1 Exception Handling 9.1.1 Exceptions in Python 9.1.2 Use of try...except 9.1.3 Use of try...finally 9.1.4 Use raise to throw Exception 9.1.5 Custom exception 9.1.6 How to use assert statement 9.1.7 Exception information 9.2 Use pythonwin to debug the program 9.3 Use eclipse for python to debug the program 9.3.1 Create a new project 9.3.2 Configure debugging 9.3.3 Set breakpoints 9.4 Summary Chapter 10 Database Programming in Python 10.1 Database Programming in the Python Environment 10.1.1 Accessing the database through odbc 10.1.2 Accessing the database using the dao object 10.1.3 Using the activex data object to access the database Modification module 10.2.1 Use dbhash module to read and write data 10.2.2 Shelve module to read and write data 10.3 Embedded database sqlite 10.3.1 SQLite command line tool 10.3.2 Use sqlite3 module to access sqlite database 10.4 Summary The second part of python gui programming Chapter 11 Development Environment of wxpython 11.1 GUI Development Library Supported by Python 11.1.1tkinter 11.1.2pygtk 11.1.3pyqt 11.2 Introduction to wxpython 11.2.1 Download and Install wxpython 11.2.2 The first wxpython program 11.2.3 Package of wxpython: pythoncard 11.3wxpython 11.3.1 Use wxglade to develop wxpython program 11.3.2 Use wxformbuilder to develop wxpython program 11.3.3 Use boa?constructor to develop wxpython programs 11.4 Summary Chapter 12 Preliminary wxpython framework 12.1 Program structure of wxpython 12.1.1 Composition of wxpython application 12.1.2 Composition of wxpython window 12.1.3 Running process of wxpython application 12.2 Event-driven programming in wxpython 12.2 .1 Event-driven programming model 12.2.2 Event triggering 12.2.3 Event binding and processing 12.3 Common components of wxpython 12.3.1 Dialog 12.3.2 Toolbar 12.3.3 Status bar 12.4 Summary Chapter 13 In the wxpython library The basic components of 13.1 Static text box 13.2 Text box 13.2.1 Single-line text box 13.2.2 Multi-line text box 13.3 Button control 13.3.1 Common button 13.3.2 Bitmap button 13.4 Radio box 13.4.1 Selection of radio box 13.4 .2 Grouping of single-select boxes 13.5 Multi-select boxes 13.5.1 Multi-select boxes 13.5.2 Multi-select box events 13.6 List controls 13.6.1 List boxes 13.6.2 Drop-down lists 13.6.3 Editable drop-down lists 13.7 Use sizers layout components 13.7.1sizers layout manager 13.7.2 grid sizer layout 13.7.3 flex grid sizer layout 13.7.4 grid bag sizer layout 13.7.5 box sizer layout 13.8 summary Chapter 14 Menu, window and dialog box controls in wxpython library 14.1 menu 14.1.1 creation Menu 14.1.2 Menu events 14.1.3 Multi-level menu 14.1.4 Menu shortcut keys 14.1.5 Bitmap menu 14.1.6 Context menu 14.2 Window 14.2.1 Frame window 14.2.2 Frame window with toolbar and status bar 14.2 .3mdi window 14.2.4 miniframe window 14.3 dialog box 14.3.1 dialog box creation 14.3.2 prompt dialog box 14.3.3 text input dialog box 14.3.4 special dialog box 14.3.5 window and dialog box interaction 14.4 Summary Chapter 15 Advanced Controls in the wxpython Library 15.1 Table Control 15.1.1 Creation of Table Control 15.1.2 Creating Tables through pygridtable 15.1.3 Cells of Table Controls 15.1.4 Handling Cell Events 15.2 Advanced List Controls 15.2. 1 Creation of List Control 15.2.2 Sorting of List Control 15.2.3 List Control with Bitmap 15.3 Tree Control 15.3.1 Creation of Tree Control 15.3.2 Events of Tree Control 15.3.3 Tree Table Control 15.4 Timer Controls 15.5 SummaryChapter 16 Advanced Features in the wxpython Library 16.1 HTML Display under WxPython 16.1.1 HTML Display 16.1.2 Simple Browser Based on HTMLWindow 16.2 Xrc in WxPython 16.2.1 Use of xrc 16.2.2 xrc File 16.3 Clipboard Operation 16.3.1 Clipboard object in wxpython 16.3.2 Processing clipboard object 16.3.3 Clipboard operation example 16.4 Summary The third web development of python Chapter 17 HTML application of python 17.1 HTML introduction 17.1.1 The history of html 17.1.2sgml The relationship between, html and xhtml 17.1.3 html tags 17.1.4 html frame composition 17.2 url processing 17.2.1 uniform resource locator url 17.2.2 url parsing 17.2.3 url stitching 17.2.4 url decomposition 17.2.5 url Encoding and Decoding 17.2.6 Encoding and Decoding of Chinese 17.2.7 Encoding of Query Parameters 17.3 Use of Cgi 17.3.1 Introduction of Cgi 17.3.2 Obtaining Cgi Environment Information 17.3.3 Parsing User Input 17.4 Obtaining HTML Resources 17.4.1 Using Urlopen and urlretrieve obtains http resources 17.4.2 analyzes the relevant information of the returned resources 17.4.3 customizes the resource acquisition method 17.4.4 uses the urllib2 module to obtain resources 17.4.5 uses the httplib module to obtain resources 17.5 html document analysis 17.5.1 uses the htmlparser module 17.5.2sgmllib's html document processing 17.5.3 html document element processing 17.5.4 using htmllib to process html documents 17.6 summary Chapter 18 python and xml 18.1 xml introduction 18.1.1 xml evolution history 18.1.2 xml advantages and limitations 18.1.3 xml technology python Support 18.2 xml document overview and verification 18.2.1 Basic concepts of xml documents 18.2.2 Validation of the structure of xml documents. 18.2.3 Validity verification of xml documents 18.3 Structure of xml documents 18.3.1 Elements and tags of xml 18.3.2 Elements Properties 18.3.3 xml text 18.3.4 character entities 18.3.5cdata section 18.3.6 comments 18.3.7 processing instructions 18.3.8 xml definition 18.4 using sax to process xml documents 18.4.1 sax introduction 18.4.2 the components of sax processing 18.5 using dom to process xml Document 18.5.1dom Introduction 18.5.2 Interface operations in the xml.dom module 18.5.3 Operations on xml documents 18.6 Summary Chapter 19 Python web development-Django framework applications 19.1 Common web development frameworks 19.1.1 zope 19.1.2 turbogears 19.1.3 django 19.1.4 Other web development frameworks 19.1.5 Choice of various development frameworks 19.2 MVC mode 19.2.1 MVC mode Introduction 19.2.2 MVC mode advantages and disadvantages 19.2.3 MVC in the django framework 19.3 Django development environment to build 19.3 .1 The installation of the django framework 19.3.2 The configuration of the database 19.4 The application of the django framework 19.4.1 The creation of a web application 19.4.2 The development server in django 19.4.3 The creation of a database 19.4.4 The creation of a django application 19.4.5 The creation of a data model 19.4.6 Url design 19.4.7 Create view 19.4.8 Template system 19.4.9 Release django project 19.5 Advanced application of django framework 19.5.1 Management interface 19.5.2 Generating database data 19.5.3 Session function 19.5.4 Internationalization 19.6 Summary Chapter 20 Application of Agile Methodology in Python-Test Driven Development 20.1 Test Driven Development 20.1.1 Test Driven Development Mode (tdd) 20.1.2 Advantages of tdd 20.1.3 Use steps of tdd 20.2 unittest test framework 20.2.1 unittest module introduction 20.2.2 build test cases 20.2.3 build test firmware 20.2.4 organize multiple test cases 20.2.5 build test suite 20.2.6 refactor code 20.2.7 Performing tests 20.3 Using the doctest module for testing 20.3.1 Introduction to the doctest module 20.3.2 Building executable documents 20.3.3 Performing doctest testing 20.4 Summary Chapter 4 Other applications of python Chapter 21 Processes and threads in python 21.1 Processes and threads 21.1. 1 Concept of process and thread 21.1.2 Support for process and thread processing in python 21.2 Process programming under python 21.2.1 Process operating environment 21.2.2 Create process 21.2.3 Terminate process 21.3 Use subprocess module to manage process 21.3.1 Use Popen class management process 21.3.2 call external system commands 21.3.3 to replace other process creation functions 21.4 inter-process signal mechanism 21.4.1 signal processing 21.4.2 signal usage rules 21.5 multi-threaded overview 21.5.1 what is multi-threaded 21.5 .2 Thread state 21.5.3 Thread support in python 21.6 Spawning and terminating threads 21.6.1 Using thread module 21.6.2 Using threading.thread class 21.7 Managing threads 21.7.1 Thread state transfer 21.7.2 Main thread's control of sub-threads 21.7.3 Local variables in threads 1.8 Synchronization between threads 21.8.1 Critical resources and critical sections 21.8.2 Lock mechanism 21.8.3 Condition variables 21.8.4 Semaphore 21.8.5 Synchronization queue 21.8.6 Thread synchronization summary 21.9 Summary Chapter 22 Python-based System Management 22.1 Enhanced interactive environment ipython 22.1.1 Introduction to ipython 22.1.2 Installation of ipython 22.1.3 Start of ipython 22.1.4 Environment configuration of ipython 22.1.5 Exit of ipython 22.2 Simple interaction with ipython 22.2.1 Input and output in ipython 22.2.2 Output The difference in prompt 22.2.3 The reason for the different output prompt 22.2.4 In and out in ipython 22.3 Magic function in ipython 22.3.1 Use and construction of magic function 22.3.2 Directory management 22.3.3 Collection of object information 22.4ipython is suitable Features in system management 22.4.1 Tab completion 22.4.2 History record function 22.4.3 Execution of external system commands and running script files 22.4.4 Object viewing and introspection 22.4.5 Direct code editing 22.4.6 Setting aliases and macros 22.5 Use python file management 22.5.1 file comparison 22.5.2 file archiving 22.5.3 file compression 22.6 using python to execute tasks at regular intervals 22.6.1 using the sleep function 22.6.2 using sched to execute tasks at regular intervals 22.7 summary Chapter 23 python and network Programming 23.1 Introduction to the network model 23.1.1 Introduction to osi 23.1.2 Introduction to tcp/ip 23.2 Socket application 23.2.1 Basic knowledge of socket 23.2.2 How socket works 23.3 Server-side and client-side communication 23.3.1 Server-side construction 23.3.2 Client-side construction 23.4 Asynchronous Communication mode 23.4.1 Use fork mode 23.4.2 Use thread mode 23.4.3 Asynchronous io mode 23.4.4 Use asyncore module 23.5 twisted network framework 23.5.1 Understanding twisted framework 23.5.2 Server-side implementation under twisted framework 23.5.3 Server under twisted framework Other processing at the end 23.6 Summary Chapter 24 Common python network applications 24.1 Using FTP to transfer files 24.1.1 The working principle of FTP and the support of python libraries 24.1.2ftp login and logout 24.1.3 ftp data transfer 24.2 use pop3 to get mail 24.2.1 pop3 protocol introduction 24.2.2 poplib module use 24.3 use smtp to send mail 24.3.1 smtp protocol introduction 24.3.2 smtplib module use 24.4 use telnet protocol remote login 24.4.1 Introduction to the telnet protocol and support of the python library 24.4.2 How to use the telnetlib module 24.5 Use snmp to manage the network 24.5.1 The composition of the snmp protocol 24.5.2 Introduction to the pysnmp framework and its use 24.6 Network analysis 24.6.1 Overview of network analysis 24.6.2 Use Scapy Captures Packet Analysis in the Network 24.7 Summary Chapter 25 Image Processing and Game Development 25.1 Basic Concepts of Image Processing 25.1.1 Image Processing Packages under Python 25.1.2 Image File Formats Supported by Pil 25.1.3 Other Concepts in Image Processing 25.2 Images 25.2.1 Image read and write operations 25.2.2 Obtain image information 25.2.3 Image file format conversion 25.2.4 Image cropping and synthesis 25.2.5 Image transformation 25.3 Advanced applications of image processing 25.3.1 Image Channel operation 25.3.2 Image enhancement processing 25.3.3 Built-in filters in pil 25.4 Game development using pygame 25.4.1 Python game development kit: pygame 25.4.2 Creating a basic pygame window 25.4.3 Event system 25.5 Summary Chapter 26 Python language 26.1. python language extension 26.1.1 python extension introduction 26.1.2 a c extension example 26.1.3 module method table and initialization function 26.1.4 compilation and testing 26.2 python language embedding 26.2.1 python embedding introduction 26.2.2 An example of python embedding 26.2.3 Better embedding 26.3 Summary Chapter 27 Python 27.1 Component Object Model under Windows 27.1.1 Component Object Model Introduction 27.1.2 COM Structure 27.1.3 The Interaction of COM Objects 27.2python support for com technology 27.2.1windows extension in python: pywin32 27.2.2 client com component 27.2.3 implementation of com component 27.3 common python applications under windows 27.3.1 automatic access to word 27.3.2 automatic access to excel Access 27.3.3 Automatic access to powerpoint 27.3.4 Automatic access to outlook 27.4 Summary...