Making Use of Python

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

THE GOOD: I read this book cover-to-cover in a week. It's a small book (300 pages) and a quick read for an experienced programmer. I liked the format of the book as well. It uses a fictitious storyline where you and the author are trying to build a website for "Techsity University". The overall quality of editing was decent, but it could have been a lot better. I found at least 10 editorial mistakes, including a paragraph repeated verbatim right after it was stated. Yet, I found only one mistake where the code was incorrect in the whole book, which is a huge plus, as I hate finding bugs in an author's code when I am learning the language from them. THE BAD: The coverage of method overriding was confusing, despite the fact I knew what the author was saying. I can easily imagine someone who does not know what method overriding is being extremely confused by this section of the book. It's not that the overall book is confusing, because, at times, the author makes stellar points. The problem is that the quality of the writing is not consistent and can vary greatly from topic to topic, and sometimes varies greatly within a single example. For instance, the coverage of CGI programming uses antiquated HTML style and generally looks like HTML written in the 1990s. In addition, the book does not really discuss the "Pythonic Way" to write things. This, I feel, is the greatest shortcoming of the book, since it seems to be targeted toward experienced programmers who are familiar with concepts like polymorphism and inheritance. While form should never come before substance, Python programmers believe there is a canonical way to do any task in Python. This belief is seems so engrained in the Python community that I am surprised the author did not bring it up. There are also some technical errors in places. For instance, when the author is describing the MySQLdb module, she says that close() will close a connection to a database. This is not true. It only closes the cursor. A database connection will be trivially closed when the object is no longer in used. Finally, this book is not for beginners! The book does not contain any exercises, so it is probably not appropriate for someone looking to learn programming. For that, I recommend Python Programming: An Introduction to Computer Science. Overall, the book does not have a suitable audience. Experienced programmers probably will want a book that focus on the "Pythonic Way" presentational angle, while beginners will want exercises to test their comprehension of new concepts.

Author(s): Rashi Gupta
Edition: 1st
Publisher: Wiley
Year: 2002

Language: English
Commentary: +OCR
Pages: 416

Making Use of Python......Page 2
Contents......Page 6
Introduction......Page 12
Features of Python......Page 13
Users and Application Areas of Python......Page 18
Python versus Other Languages......Page 19
How This Book Is Organized......Page 20
What’s on the Web Site......Page 22
Techsity University......Page 24
Fee Structure......Page 25
Future Direction......Page 26
Getting Started......Page 28
Obtain Python and Its Documentation......Page 29
Determine the System Requirements......Page 31
Install Python......Page 32
Start Python in Different Execution Modes......Page 34
Summary......Page 39
Getting Started with Python......Page 40
Writing Your First Python Program......Page 41
Comments......Page 42
Using Variables in Python......Page 43
Variables......Page 44
Assigning Values to Variables......Page 45
Standard Types......Page 46
Identifiers and Keywords......Page 66
Memory Management......Page 67
Write the Code to Display the Names of the Students......Page 69
Save and Execute the Code......Page 70
Summary......Page 71
Intrinsic Operations and Input/Output......Page 74
Using Input/Output Features and Intrinsic Operations for Data Types in Python......Page 75
Accepting User Input......Page 76
Formatting the Output......Page 77
Introduction to Intrinsic Operations......Page 82
Intrinsic Operations for Numeric Data Types......Page 84
Intrinsic Operations for Strings......Page 87
Intrinsic Operations for Lists and Tuples......Page 93
Execute the Code......Page 98
Summary......Page 100
Programming Basics......Page 102
Conditional Operators......Page 103
Order of Precedence of Operators......Page 109
Using Programming Constructs......Page 110
Identify the Control and Loop Statements to Be Used......Page 111
Write the Code......Page 121
Execute the Code......Page 122
Summary......Page 124
Functions......Page 126
Using Functions......Page 127
Functions......Page 128
Scope of Variables......Page 145
Write the Code......Page 146
Execute the Code......Page 148
Summary......Page 149
Modules......Page 150
Modules......Page 151
Packages......Page 162
Identify the Modules to Be Used......Page 163
Write the Code......Page 164
Execute the Code......Page 166
Summary......Page 167
Files......Page 168
Identify the Functions and Methods to Be Used......Page 169
Write the Code to Store Course Details to a File......Page 181
Verify the Solution......Page 182
Summary......Page 183
Object-Oriented Programming......Page 184
Introducing OOP......Page 185
Components of OOP......Page 186
Benefits of OOP......Page 187
Using Classes......Page 188
Identify the Classes to Be Defined......Page 189
Identifying the Class Objects......Page 190
Identifying the Classes to Be Inherited and Their Objects......Page 197
Identify the Methods to Be Overridden......Page 200
Write the Code......Page 209
Execute the Code......Page 216
Summary......Page 217
Getting Started......Page 220
Handling Exceptions......Page 221
Identify the Type of Error and Where the Error Occurs......Page 223
Identify the Mechanism of Trapping the Exception......Page 227
Write the Code for Handling the Exception......Page 236
Summary......Page 237
Getting Started......Page 240
Internet Basics......Page 241
Web Browsers......Page 244
Hypertext Transfer Protocol (HTTP)......Page 247
Revising HTML......Page 248
Client-Side versus Server-Side Scripting......Page 254
An Introduction to CGI......Page 256
Write the CGI Program in Python to Generate the Results Page......Page 258
Write the CGI Program to Generate Both the Form and Results Pages......Page 262
Execute the Code......Page 263
Summary......Page 265
Getting Started......Page 267
Database Management......Page 268
Introduction to MySQL......Page 269
Working with MySQL......Page 272
Accessing a Database from a Python Script......Page 280
Identify the Steps for Connecting to the Database......Page 282
Write the Code to Create a Table in the Database......Page 285
into the Table Created......Page 286
Execute the Code to Insert Data into the Table......Page 287
Verify the Data in the Database......Page 289
Summary......Page 290
Getting Started......Page 293
Client/Server Architecture......Page 294
Network Programming......Page 295
Identify the Sockets to Be Used......Page 298
Write the Code to Run on the IT Department Computer......Page 313
Write the Code to Run on the Admission Office Computer......Page 314
Execute the Code Created for the IT Department Computer......Page 315
Execute the Code Created for the Admission Office Computer......Page 316
Summary......Page 318
Getting Started......Page 323
Single-Threaded Applications......Page 324
Threading in Python......Page 325
Identify the Class and the Methods to Create a Multithreaded Application......Page 326
Write Code for the Server......Page 334
Write the Code for the Client......Page 335
Execute the Code Created for the Server......Page 336
Execute the Code Created for the Client......Page 337
Summary......Page 339
Advanced Web Programming......Page 341
Creating Web Servers......Page 342
Accessing URLs......Page 349
Assignment Details and Uploading the File......Page 354
Identify the Methodology for Uploading the File......Page 355
Identify the Methodology for Storing User Information......Page 356
Write the Code for the CGI Script......Page 361
Execute the CGI Script......Page 365
Summary......Page 366
Getting Started......Page 369
Introduction to Tkinter......Page 370
Creating a GUI Application......Page 373
Identify the Tkinter Widgets to Design the User Interface......Page 374
Write the Code for the User Interface......Page 386
Execute the Code......Page 388
Summary......Page 390
Basics of COM......Page 391
The Binary Standard......Page 393
COM Interfaces......Page 395
Binding......Page 396
Creating COM Clients......Page 397
Creating COM Servers......Page 399
End of Book......Page 403