Drive Into Python is an Book which is written by Mark Pilgrim, This book contains 328 Pages and deep learning of python programming
Download Free Book Now
Dive Into Python 1
Chapter 1 Installing Python 2
11 Which Python is right for you? 2
12 Python on Windows 2
13 Python on Mac OS X 3
14 Python on Mac OS 9 5
15 Python on RedHat Linux 5
16 Python on Debian GNU/Linux 6
17 Python Installation from Source 6
18 The Interactive Shell 7
19 Summary 8
Chapter 2 Your First Python Program 9
21 Diving in 9
22 Declaring Functions 9
23 Documenting Functions 10
24 Everything Is an Object 11
25 Indenting Code 13
26 Testing Modules 14
Chapter 3 Native Datatypes 15
31 Introducing Dictionaries 15
32 Introducing Lists 17
33 Introducing Tuples 22
34 Declaring variables 23
35 Formatting Strings 25
36 Mapping Lists 26
37 Joining Lists and Splitting Strings 28
38 Summary 29
Chapter 4 The Power Of Introspection 31
41 Diving In 31
42 Using Optional and Named Arguments 32
43 Using type, str, dir, and Other Built−In Functions 33
44 Getting Object References With getattr 36
45 Filtering Lists 38
46 The Peculiar Nature of and and or 39
47 Using lambda Functions 41
48 Putting It All Together 43
49 Summary 45
Chapter 5 Objects and Object−Orientation 47
51 Diving In 47
52 Importing Modules Using from module import 49
53 Defining Classes 50
54 Instantiating Classes 53
55 Exploring UserDict: A Wrapper Class 54
56 Special Class Methods 56
57 Advanced Special Class Methods 59
Chapter 5 Objects and Object−Orientation
58 Introducing Class Attributes 60
59 Private Functions 62
510 Summary 63
Chapter 6 Exceptions and File Handling 64
61 Handling Exceptions 64
62 Working with File Objects 66
63 Iterating with for Loops 70
64 Using sysmodules 72
65 Working with Directories 74
66 Putting It All Together 77
67 Summary 78
Chapter 7 Regular Expressions 81
71 Diving In 81
72 Case Study: Street Addresses 81
73 Case Study: Roman Numerals 83
74 Using the {n,m} Syntax 85
75 Verbose Regular Expressions 88
76 Case study: Parsing Phone Numbers 89
77 Summary 93
Chapter 8 HTML Processing 94
81 Diving in 94
82 Introducing sgmllibpy 98
83 Extracting data from HTML documents 100
84 Introducing BaseHTMLProcessorpy 102
85 locals and globals 104
86 Dictionary−based string formatting 107
87 Quoting attribute values 108
88 Introducing dialectpy 109
89 Putting it all together 111
810 Summary 113
Chapter 9 XML Processing 115
91 Diving in 115
92 Packages 121
93 Parsing XML 123
94 Unicode 125
95 Searching for elements 129
96 Accessing element attributes 131
97 Segue 132
Chapter 10 Scripts and Streams 133
101 Abstracting input sources 133
102 Standard input, output, and error 136
103 Caching node lookups 140
104 Finding direct children of a node 141
105 Creating separate handlers by node type 141
Chapter 10 Scripts and Streams
106 Handling command−line arguments 143
107 Putting it all together 146
108 Summary 148
Chapter 11 HTTP Web Services 149
111 Diving in 149
112 How not to fetch data over HTTP 151
113 Features of HTTP 152
114 Debugging HTTP web services 153
115 Setting the User−Agent 155
116 Handling Last−Modified and ETag 156
117 Handling redirects 159
118 Handling compressed data 163
119 Putting it all together 165
1110 Summary 167
Chapter 12 SOAP Web Services 168
121 Diving In 168
122 Installing the SOAP Libraries 169
123 First Steps with SOAP 171
124 Debugging SOAP Web Services 172
125 Introducing WSDL 173
126 Introspecting SOAP Web Services with WSDL 174
127 Searching Google 176
128 Troubleshooting SOAP Web Services 179
129 Summary 182
Chapter 13 Unit Testing183
131 Introduction to Roman numerals 183
132 Diving in 184
133 Introducing romantestpy 184
134 Testing for success 187
135 Testing for failure 189
136 Testing for sanity 190
Chapter 14 Test−First Programming 193
141 romanpy, stage 1 193
142 romanpy, stage 2 196
143 romanpy, stage 3 199
144 romanpy, stage 4 202
145 romanpy, stage 5 205
Chapter 15 Refactoring 208
151 Handling bugs 208
152 Handling changing requirements 210
153 Refactoring 216
154 Postscript 219
155 Summary 221
Chapter 16 Functional Programming223
161 Diving in 223
162 Finding the path 224
163 Filtering lists revisited 226
164 Mapping lists revisited 228
165 Data−centric programming 229
166 Dynamically importing modules 230
167 Putting it all together 231
168 Summary 234
Chapter 17 Dynamic functions 235
171 Diving in 235
172 pluralpy, stage 1 235
173 pluralpy, stage 2 237
174 pluralpy, stage 3 239
175 pluralpy, stage 4 240
176 pluralpy, stage 5 242
177 pluralpy, stage 6 243
178 Summary 246
Chapter 18 Performance Tuning 247
181 Diving in 247
182 Using the timeit Module 249
183 Optimizing Regular Expressions 250
184 Optimizing Dictionary Lookups 253
185 Optimizing List Operations 256
186 Optimizing String Manipulation 258
187 Summary 260
Appendix A Further reading 261
Appendix B A 5−minute review 268
Appendix C Tips and tricks 282
Appendix D List of examples 289
Appendix E Revision history 302
Appendix F About the book 314
Appendix G GNU Free Documentation License 315
G0 Preamble 315
G1 Applicability and definitions 315
G2 Verbatim copying 316
G3 Copying in quantity 316
G4 Modifications 317
G5 Combining documents 318
G6 Collections of documents 318
G7 Aggregation with independent works 318
Appendix G GNU Free Documentation License
G8 Translation 318
G9 Termination 319
G10 Future revisions of this license 319
G11 How to use this License for your documents 319
Appendix H Python license 320
HA History of the software 320
HB Terms and conditions for accessing or otherwise using Python 320