- This tutorial offers readers a thorough introduction to programming in Python 2.4, the portable, interpreted, object-oriented programming language that combines power with clear syntax
- Beginning programmers will quickly learn to develop robust, reliable, and reusable Python applications for Web development, scientific applications, and system tasks for users or administrators
- Discusses the basics of installing Python as well as the new features of Python release 2.4, which make it easier for users to create scientific and Web applications
- Features examples of various operating systems throughout the book, including Linux, Mac OS X/BSD, and Windows XP
Chapter 1: Programming Basics and Strings.
Chapter 2: Numbers and Operators.
Chapter 3: Variables—Names for Values.
Chapter 4: Making Decisions.
Chapter 5: Functions.
Chapter 6: Classes and Objects.
Chapter 7: Organizing Programs.
Chapter 8: Files and Directories.
Chapter 9: Other Features of the Language.
Chapter 10: Building a Module.
Chapter 11: Text Processing.
Chapter 12: Testing.
Chapter 13: Writing a GUI with Python.
Chapter 14: Accessing Databases.
Chapter 15: Using Python for XML.
Chapter 16: Network Programming.
Chapter 17: Extension Programming with C.
Chapter 18: Writing Shareware and Commercial Programs.
Chapter 19: Numerical Programming.
Chapter 20: Python in the Enterprise.
Chapter 21: Web Applications and Web Services.
Chapter 22: Integrating Java with Python.
Appendix A: Answers to Exercises.
Appendix B: Online Resources.
Appendix C: What’s New in Python 2.4.
Alex Samuel (San Diego, CA) has developed software for biology researchers and now studies highenergy physics at Caltech. Alex has worked on many GNU/Linux development tools, including GCC, and co-founded CodeSourcery LLC, a consulting firm specializing in GNU/Linux development tools.
David Aitel (NY, NY) is the CEO of Immunity and a coauthor of Shellcoder’s Handbook.
Eric Foster-Johnson (Minneapolis, MN) uses Python extensively with Java, and is a veteran author, most recently completing Beginning Shell Scripting.
Leonard Richardson (San Francisco, CA) writes useful Python packages with silly names.
Jason Diamond (CA) Jason Diamond is a software development instructor for DevelopMentor and a consultant specializing in C++, .NET, Python, and XML. He spends most of his spare time contributing to open-source projects using his favorite language, Python.
Aleathea Parker (San Francisco CA) is a programmer working as a publication engineer for a major software company, coding primarily in Python and XSLT. She has a background in web applications and content management.
Michael Roberts (Puerto Rico) has been programming professionally in C, Perl, and Python for long enough that Python didn’t actually exist when he started. He is the chief perpetrator of the wftk open-source workflow toolkit, and he swears that it will someday be finished, for certain values of “finished”.
|Source code from the book
Here is the source code from the book. The source code is stored in a .zip archive. You will need software capable of uncompressing .zip archives to view the source code.
|115.89 KB||Click to Download|
Do you think you've discovered an error in this book? Please check the list of errata below to see if we've already addressed the error. If not, please submit the error via our Errata Form. We will attempt to verify your error; if you're right, we will post a correction below.
|24||Error in Code/Text
The errata should be as follows:
"Therefore, the numbers 0 to 20 in decimal...."
if you add the number 14 in the sequence then this sentence will be true. So the number sequence for 0 to 20 in hex should be the following:
|31||Error in Code
Highlighted code, middle of page:
>>> print a[len(a) - 1]
>>> print a[len(a) - 1]
|4||45||Error in Code
">>> tuesday_breakfast_sold != thursday_breakfast_sold False"
two options for correction:
"False" should be "True" because the strings are different.
the "!=" should be "==" and then the "False" is correct.
|61||Error in Code/Text
Page 61, first printing:
At the bottom, in "Try It Out", the text sentence should end "ch5.py".
The snippet following, "def in_fridge:" should be part of the code example below it.
|315, 317, 321||Error in Code
... = MIMEImage(open(filename).read(), ...
... = MIMEImage(file(filename, "rb").read() ...