0%

Python编程(上下)(影印版)(第4版)

基本信息

名称: Python编程(上下)(影印版)(第4版)
作者信息: 作者: 浏览全部评论 [ 英文 pdf ]

简单介绍

《Python编程(影印版)(第4版)(套装共2册)》针对该语言的主要应用领域——系统管理、GUI和Web——做了深入讲解,并且探索了它在数据库、网络、前端脚本撰写层、文本处理和更多方面的使用。通过重点关注常用工具和库,你将会对Python在实际现实世界里的编程有更深的理解。你将通过一种清晰和简洁的方式——讲解大量正确用法和常见惯例的例子——学会语言的语法和编程技巧。《Python编程(影印版)(第4版)(套装共2册)》针对3.x版本做了完全的更新,它探讨了Python如何成为软件开发工具,并且特别为此设计了很多代码示例。

目录

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
Preface
Part Ⅰ.The Beginning
1.A Sneak Preview
“Programming Python: The Short Story”
The Task
Step 1: Representing Records
Using Lists
Using Dictionaries
Step 2: Storing Records Persistently
Using Formatted Files
Using Pickle Files
Using Per-Record Pickle Files
Using Shelves
Step 3: Stepping Up to OOP
Using Classes
Adding Behavior
Adding Inheritance
Refactoring Code
Adding Persistence
Other Database Options
Step 4: Adding Console Interaction
A Console Shelve Interface
Step 5: Adding a GUI
GUI Basics
Using OOP for GUIs
Getting Input from a User
A GUI Shelve Interface
Step 6: Adding a Web Interface
CGI Basics
Running a Web Server
Using Query Strings and urllib
Formatting Reply Text
A Web-Based Shelve Interface
The End of the Demo
Part Ⅱ.System Programming
2.System Tools
“The os.path to Knowledge”
Why Python Here?
The Next Five Chapters
System Scripting Overview
Python System Modules
Module Documentation Sources
Paging Documentation Strings
A Custom Paging Script
String Method Basics
Other String Concepts in Python 3.X: Unicode and bytes
File Operation Basics
Using P'rograms in Two Ways
Python Library Manuals
Commercially Published References
Inrroducing the sys Module
Platforms and Versions
The Module Search Path
The Loaded Modules Table
Exception Details
Other sys Module Exports
Introducing the os Module
Tools in the os Module
Administrative Tools
Portability Constants
Common os.path Tools
Running Shell Commands from Scripts
Other os Module Exports
3.Script Execution Context
“I’d Like to Have an Argument, Please”
Current Working Directory
CWD, Files, and Import Paths
CWD and Command Lines
Thread Exits and Shared State
Interprocess Communication
Anonymous Pipes
Named Pipes (Fifos)
Sockets: A First Look
Signals
The multiprocessing Module
Why multiprocessing?
The Basics: Processes and Locks
IPC Tools: Pipes, Shared Memory, and Queues
Starting Independent Programs
And Much More
Why multiprocessing? The Conclusion
Other Ways to Start Programs
The os.spawn Calls
The os.startfile call on Windows
A Portable Program-Launch Framework
Other System Tools Coverage
Command-Line Arguments
Parsing Command-Line Arguments
Shell Environment Variables
Fetching Shell Variables
Changing Shell Variables
Shell Variable Fine Points: Parents, putenv, and getenv
Standard Streams
Redirecting Streams to Files and Programs
Redirected Streams and User Interaction
Redirecting Streams to Python Objects
The io.StringIO and io.Bytesl0 Utility Classes
Capturing the stderr Stream
Redirection Syntax in Print Calls
Other Redirection Options: os.popen and subprocess Revisited
4.File and Directory Tools
“Erase Your Hard Drive in Five Easy Steps!”
File Tools
The File Object Model in Python 3,X
Using Built-in File Objects
Binary and Text Files
Lower-Level File Tools in the os Module
File Scanners
Directory Tools
Walking One Directory
Walking Directory Trees
Handling Unicode Filenames in 3.X: listdir, walk, glob
5.Parallel System Tools
“Telling the Monkeys What to Do”
Forking Processes
The fork/exec Combination
Threads
The _thread Module
The threading Module
The queue Module
Preview: GUIs and Threads
More on the Globallnterpreter Lock
Program Exits
sys Module Exits
os Module Exits
Shell Command Exit Status Codes
Process Exit Status and Shared State
Thread Exits and Shared State
Interprocess Communication
Anonymous Pipes
Named Pipes (Fifos)
Sockets: A First Look
Signals
The multiprocessing Module
Why multiprocessing?
The Basics: Processes and Locks
IPC Tools: Pipes, Shared Memory, and Queues
Starting Independent Programs
And Much More
Why multiprocessing? The Conclusion
Other Ways to Start Programs
The os.spawn Calls
The os.startfile call on Windows
A Portable Program-Launch Framework
Other System Tools Coverage
6.Complete System Programs
“The Greps of Wrath”
A Quick Game of “Find the Biggest Python File”
Scanning the Standard Library Directory
Scanning the Standard Library Tree
Scanning the Module Search Path
Scanning the Entire Machine
Printing Unicode Filenames
Splitting and Joining Files
Splitting Files Portably
Joining Files Portably
Usage Variations
Generating Redirection Web Pages
Page Template File
Page Generator Script
A Regression Test Script
Running the Test Driver
Copying Directory Trees
Comparing Directory Trees
Finding Directory Differences
Finding Tree Differences
Running the Script
Verifying Backups
Reporting Differences and Other Ideas
Searching Directory Trees
Greps and Globs and Finds
Rolling Your Own find Module
Cleaning Up Bytecode Files
A Python Tree Searcher
Visitor: Walking Direcror/es “++”
Editing Files in Directory Trees (Visitor)
Global Replacements in Directory Trees (Visitor)
Counting Source Code Lines (Visitor)
Recoding Copies with Classes (Visitor)
Other Visitor Examples (External)
Playing Media Files
The Python webbrowser Module
The Python mimetypes Module
Running the Script
Automated Program Launchers (External)
……
Part Ⅲ.GUI Programming
Part Ⅳ.Internet Programming
Part Ⅴ.Tools and Techniques
Part Ⅵ.The End
Index

亚马逊链接

欢迎关注我的其它发布渠道