9780130923615

Python How to Program

by ; ; ;
  • ISBN13:

    9780130923615

  • ISBN10:

    0130923613

  • Edition: 1st
  • Format: Paperback
  • Copyright: 2002-02-04
  • Publisher: Pearson
  • View Upgraded Edition

Note: Supplemental materials are not guaranteed with Rental or Used book purchases.

Purchase Benefits

  • Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $193.32 Save up to $48.33
  • Buy Used
    $144.99
    Add to Cart Free Shipping

    USUALLY SHIPS IN 2-4 BUSINESS DAYS

Supplemental Materials

What is included with this book?

Summary

Python's combination of exceptional power and simplicity has made it one of the world's fastest growing programming languages. Now, there's a comprehensive, hands-on introduction to Python from the Deitels, leading corporate trainers and authors of the best sellingHow to Programbooks. Like all of the Deitels'How to Programbooks,Python How to Programfeatures the Deitels'signature Live-CodeAgrave;TM Approach: thousands of lines of live code, explained with exceptional clarity by the renowned programming trainers of Deitel & Associates.Python How to Programcovers all facets of the Python language, from syntax to object-oriented development, CGI to XML, wireless programming to DB-API database integration. Coverage includes Python GUI development, regular expressions, file processing, exceptions, threads, networking, security, data structures, and much more. The book contains hundreds of real-world tips and techniques for writing high quality code, improving performance and reliability, and efficient debugging. A link to the Web's best Python demos and all of the book's source code, up-to-date Python development tools.For new and experienced developers who want to master Python and object-oriented development quickly; Python developers who want to deepen their skills; and Web professionals who want to leverage Python's full power in Web, XML, and wireless applications.

Author Biography

Dr. Harvey M. Deitel, CEO and Chairman of Deitel & Associates, Inc., has 41 years experience in the computing field, including extensive industry and academic experience. Dr. Deitel earned B.S. and M.S. degrees from the Massachusetts Institute of Technology and a Ph.D. from Boston University. He worked on the pioneering virtual-memory operating-systems projects at IBM and MIT that developed techniques now widely implemented in systems such as UNIX, Linux and Windows NT. He has 20 years of college teaching experience, including earning tenure and serving as the Chairman of the Computer Science Department at Boston College before founding Deitel & Associates, Inc., with his son, Paul J. Deitel. He is the author or co-author with Paul Deitel of several dozen books and multimedia packages and is writing many more. With translations published in Japanese, Russian, Spanish, Traditional Chinese, Simplified Chinese, Korean, French, Polish, Italian and Portuguese, Dr. Deitel's texts have earned international recognition. Dr. Deitel has delivered hundreds of professional seminars to major corporations, government organizations and various branches of the military.

Paul J. Deitel, Executive Vice President and Chief Technical Officer of Deitel & Associates, Inc., is a graduate of the Massachusetts Institute of Technology's Sloan School of Management, where he studied Information Technology. Through Deitel & Associates, Inc., he has delivered Java, C, C++ and Internet and World Wide Web courses to industry clients including Compaq, Sun Microsystems, White Sands Missile Range, Rogue Wave Software, Boeing, Dell, Stratus, Fidelity, Cambridge Technology Partners, Open Environment Corporation, One Wave, Hyperion Software, Lucent Technologies, Adra Systems, Entergy, CableData Systems, NASA at the Kennedy Space Center, the National Severe Storm Laboratory, IBM and many other organizations. He has lectured on C++ and Java for the Boston Chapter of the Association for Computing Machinery and has taught satellite-based Java courses through a cooperative venture of Deitel & Associates, Inc., Prentice Hall and the Technology Education Network. He and his father, Dr. Harvey M. Deitel, are the world's best-selling Computer Science textbook authors.

Jonathan Liperi is a senior at Boston University where he has been accepted into the Computer Science department's BA/MA program. He will earn his Master's degree in Computer Science in May 2003. His coursework has included advanced algorithms, queueing theory, computer architecture, computer networks, artificial intelligence, computer graphics, database systems, software engineering and various programming courses (C, C++, Python and Java).

Ben Wiedermann graduated from Boston University magna cum laude with a degree in Computer Science and a minor in Theater Arts. Ben plans to pursue post-graduate work in programming-language theory. Other Deitel publications to which he has contributed include Java How to Program, Fourth Edition; C++ How to Program, Third Edition; Perl How to Program; Internet and World Wide Web How to Program, Second Edition; XML How to Program; e-Business & e-Commerce How to Program and C How to Program, Third Edition.

Table of Contents

Preface xxxvii
Introduction to Computers, Internet and World Wide Web
1(33)
Introduction
2(1)
What Is a Computer?
3(1)
Computer Organization
4(1)
Evolution of Operating Systems
5(1)
Personal Computing, Distributed Computing and Client/Server Computing
6(1)
Machine Languages, Assembly Languages and High-Level Languages
6(1)
Structured Programming
7(1)
Object-Oriented Programming
8(1)
Hardware Trends
9(1)
History of the Internet and World Wide Web
10(2)
World Wide Web Consortium (W3C)
12(1)
Extensible Markup Language (XML)
12(1)
Open-Source Software Revolution
13(1)
History of Python
14(1)
Python Modules
15(1)
General Notes about Python and This Book
15(1)
Tour of the Book
15(12)
Internet and World Wide Web Resources
27(7)
Introduction to Python Programming
34(34)
Introduction
35(1)
First Program in Python: Printing a Line of Text
35(3)
Modifying our First Python Program
38(2)
Displaying a Single Line of Text with Multiple Statements
38(1)
Displaying Multiple Lines of Text with a Single Statement
39(1)
Another Python Program: Adding Integers
40(2)
Memory Concepts
42(3)
Arithmetic
45(5)
String Formatting
50(4)
Decision Making: Equality and Relational Operators
54(4)
Indentation
58(1)
Thinking About Objects: Introduction to Object Technology
59(9)
Control Structures
68(50)
Introduction
69(1)
Algorithms
69(1)
Pseudocode
70(1)
Control Structures
70(3)
if Selection Structure
73(1)
if/else and if/elif/else Selection Structures
74(5)
While Repetition Structure
79(2)
Formulating Algorithms: Case Study 1 (Counter-Controlled Repetition)
81(2)
Formulating Algorithms with Top-Down, Stepwise Refinement: Case Study 2 (Sentinel-Controlled Repetition)
83(5)
Formulating Algorithms with Top-Down, Stepwise Refinement: Case Study 3 (Nested Control Structures)
88(4)
Augmented Assignment Symbols
92(1)
Essentials of Counter-Controlled Repetition
93(1)
for Repetition Structure
94(3)
Using the for Repetition Structure
97(3)
break and continue Statements
100(2)
Logical Operators
102(4)
Structured-Programming Summary
106(12)
Functions
118(37)
Introduction
119(1)
Program Components in Python
119(2)
Functions
121(1)
Module math Functions
121(2)
Function Definitions
123(4)
Random-Number Generation
127(2)
Example: A Game of Chance
129(2)
Scope Rules
131(4)
Keyword import and Namespaces
135(4)
Importing One or More Modules
135(1)
Importing Identifiers from a Module
136(2)
Binding Names for Modules and Module Identifiers
138(1)
Recursion
139(2)
Example Using Recursion: The Fibonacci Series
141(3)
Recursion vs. Iteration
144(1)
Default Arguments
145(1)
Keyword Arguments
146(9)
Lists, Tuples and Dictionaries
155(38)
Introduction
156(1)
Sequences
156(2)
Creating Sequences
158(1)
Using Lists and Tuples
159(10)
Using Lists
160(3)
Using Tuples
163(2)
Sequence Unpacking
165(1)
Sequence Slicing
166(3)
Dictionaries
169(2)
List and Dictionary Methods
171(6)
References and Reference Parameters
177(1)
Passing Lists to Functions
177(2)
Sorting and Searching Lists
179(2)
Multiple-Subscripted Sequences
181(12)
Introduction to the Common Gateway Interface (CGI)
193(32)
Introduction
194(1)
Client and Web Serever Interaction
195(4)
System Architecture
195(1)
Accessing Web Servers
196(1)
HTTP Transactions
197(2)
Simple CGI Script
199(7)
Sending Input to a CGI Script
206(2)
Using XHTML Forms to Send Input and Using Module cgi to Retrieve Form Data
208(5)
Using cgi.FieldStorage to Read Input
213(1)
Other HTTP Headers
214(1)
Example: Interactive Portal
215(4)
Internet and World Wide Web Resources
219(6)
Object-Based Programming
225(35)
Introduction
226(1)
Implementing a Time Abstract Data Type with a Class
227(4)
Special Attributes
231(2)
Controlling Access to Attributes
233(9)
Get and Set Methods
233(7)
Private Attributes
240(2)
Using Default Arguments With Constructors
242(4)
Destructors
246(1)
Class Attributes
246(2)
Composition: Object References as Members of Classes
248(3)
Data Abstraction and Information Hiding
251(2)
Software Reusability
253(7)
Customizing Classes
260(36)
Introduction
261(1)
Customizing String Representation: Method _str_
262(2)
Customizing Attribute Access
264(3)
Operator Overloading
267(1)
Restrictions on Operator Overloading
268(2)
Overloading Unary Operators
270(1)
Overloading Binary Operators
270(1)
Overloading Built-in Functions
271(1)
Converting Between Types
272(1)
Case Study: A Rational Class
273(7)
Overloading Sequence Operations
280(1)
Case Study: A Singlelist Class
281(5)
Overloading Mapping Operations
286(1)
Case Study: A SimpleDictionary Class
287(9)
Object-Oriented Programming: Inheritance
296(46)
Introduction
297(1)
Inheritance: Base Classes and Derived Classes
298(3)
Creating Base Classes and Derived Classes
301(3)
Overriding Base-Class Methods in a Derived Class
304(2)
Software Engineering with Inheritance
306(1)
Composition vs. Inheritance
307(1)
``Uses A'' and ``Knows A'' Relationships
307(1)
Case Study: Point, Circle, Cylinder
308(4)
Abstract Base Classes and Concrete Classes
312(1)
Case Study: Inheriting Interface and Implementation
313(4)
Polymorphism
317(2)
Classes and Python 2.2
319(23)
Static Methods
319(3)
Inheriting from Built-in Types
322(5)
_getattribute_Method
327(3)
_slots_Class Attribute
330(3)
Properties
333(9)
Graphical User Interface Components: Part 1
342(46)
Introduction
343(2)
Tkinter Overview
345(1)
Simple Tkinter Example: Label Component
346(3)
Event Handling Model
349(1)
Entry Component
350(4)
Button Component
354(2)
Checkbutton and Radiobutton Components
356(5)
Mouse Event Handling
361(5)
Keyboard Event Handling
366(2)
Layout Managers
368(8)
Pack
369(3)
Grid
372(3)
Place
375(1)
Card Shuffling and Dealing Simulation
376(3)
Internet and World Wide Web Resources
379(9)
Graphical User Interface Components: Part 2
388(23)
Introduction
389(1)
Overview of Pmw
389(1)
Scrolledlistbox Component
390(2)
ScrolledText Component
392(3)
MenuBar Component
395(4)
Popup Menus
399(2)
Canvas Component
401(2)
Scale Component
403(2)
Other GUI Toolkits
405(6)
Exception Handling
411(25)
Introduction
412(1)
Raising an Exception
412(1)
Exception-Handling Overview
413(3)
Example: DivideByZeroError
416(3)
Python Exception Hierarchy
419(3)
finally Clause
422(3)
Exception Objects and Tracebacks
425(4)
Programmer-Defined Exception Classes
429(7)
String Manipulation and Regular Expressions
436(26)
Introduction
437(1)
Fundamentals of Characters and Strings
437(4)
String Presentation
441(1)
Searching Strings
442(2)
Joining and Splitting Strings
444(1)
Regular Expressions
445(2)
Compiling Regular Expressions and Manipulating Regular-Expression Objects
447(1)
Regular-Expression Repetition and Placement Characters
448(2)
Classes and Special Sequences
450(3)
Regular Expression String-Manipulation Functions
453(1)
Grouping
454(2)
Internet and World Wide Web Resources
456(6)
File Processing and Serialization
462(29)
Introduction
463(1)
Data Hierarchy
463(2)
Files and Streams
465(1)
Creating a Sequential-Access File
466(4)
Reading Data from a Sequential-Access File
470(5)
Updating Sequential-Access Files
475(1)
Random-Access Files
475(1)
Simulating a Random-Access File: The shelve Module
476(1)
Writing Data to a shelve File
476(2)
Retrieving Data from a shelve File
478(1)
Example: A Transaction-Processing Program
479(5)
Object Serialization
484(7)
Extensible Markup Language (XML)
491(38)
Introduction
492(1)
XML Documents
492(5)
XML Namespaces
497(3)
Document Object Model (DOM)
500(1)
Simple API for XML (SAX)
500(1)
Document Type Definitions (DTDs), Schemas and Validation
501(8)
Document Type Definition Documents
502(4)
W3C XML Schema Documents
506(3)
XML Vocabularies
509(7)
MathML™
510(4)
Chemical Markup Language (CML)
514(2)
Other XML Vocabularies
516(1)
Extensible Stylesheet Language (XSL)
516(6)
Internet and World Wide Web Resources
522(7)
Python XML Processing
529(40)
Introduction
530(1)
Generating XML Content Dynamically
530(3)
XML Processing Packages
533(1)
Document Object Model (DOM)
534(9)
Parsing XML with xml.sax
543(3)
Case Study: Message Forums with Python and XML
546(18)
Displaying the Forums
548(3)
Adding Forums and Messages
551(8)
Alterations for Browsers without XML and XSLT Support
559(5)
Internet and World Wide Web Resources
564(5)
Database Application Programming Interface (DB-API)
569(44)
Introduction
570(1)
Relational Database Model
571(1)
Relational Database Overview: Books Database
572(7)
Structured Query Language (SQL)
579(15)
Basic SELECT Query
580(1)
WHERE Clause
581(2)
ORDER BY Clause
583(4)
Merging Data from Multiple Tables: INNER JOIN
587(2)
Joining Data from Tables Authors, AuthorISBN, Titles and Publishers
589(2)
INSERT Statement
591(1)
UPDATE Statement
592(1)
DELETE Statement
593(1)
Python DB-API Specification
594(1)
Database Query Example
595(3)
Querying the Books Database
598(4)
Reading, Inserting and Updating a Database
602(5)
Internet and World Wide Web Resources
607(6)
Process Management
613(32)
Introduction
614(1)
os.fork Function
615(8)
os.system Function and os.exec Family of Functions
623(5)
Controlling Process Input and Output
628(3)
Interprocess Communication
631(4)
Signal Handling
635(2)
Sending Signals
637(8)
Multithreading
645(43)
Introduction
646(1)
Thread States: Life Cycle of a Thread
647(3)
threading.Thread example
650(1)
Thread Synchronization
651(2)
Producer/Consumer Relationship without Thread Synchronization
653(6)
Producer/Consumer Relationship with Thread Synchronization
659(6)
Producer/Consumer Relationship: Module Queue
665(4)
Producer/Consumer Relationship: The Circular Buffer
669(7)
Semaphores
676(2)
Events
678(10)
Networking
688(28)
Introduction
689(1)
Accessing URLs over HTTP
690(2)
Establishing a Simple Server (Using Stream Sockets)
692(2)
Establishing a Simple Client (Using Stream Sockets)
694(1)
Client/Server Interaction with Stream Socket Connections
694(5)
Connectionless Client/Server Interaction with Datagrams
699(2)
Client/Server Tic-Tac-Toe Using a Multithreaded Server
701(15)
Security
716(52)
Introduction
717(1)
Ancient Ciphers to Modern Cryptosystems
718(4)
Secret-Key Cryptography
722(2)
Public-Key Cryptography
724(3)
Cryptanalysis
727(1)
Key-Agreement Protocols
727(1)
Key Management
728(1)
Digital Signatures
728(2)
Public-Key Infrastructure, Certificates and Certificate Authorities
730(4)
Smart Cards
733(1)
Security Protocols
734(2)
Secure Sockets Layer (SSL)
734(1)
IPSec and Virtual Private Networks (VPN)
735(1)
Authentication
736(3)
Kerberos
737(1)
Biometrics
737(1)
Single Sign-On
738(1)
Microsoft® Passport
739(1)
Security Attacks
739(5)
Denial-of-Service (DoS) Attacks
740(1)
Viruses and Worms
741(2)
Software Exploitation, Web Defacing and Cybercrime
743(1)
Running Restricted Python Code
744(5)
Module rexec
745(1)
Module Bastion
745(1)
Restricted Web Browser
745(4)
Network Security
749(3)
Firewalls
749(1)
Intrusion-Detection Systems
750(2)
Steganography
752(2)
Internet and World Wide Web Resources
754(14)
Data Structures
768(29)
Introduction
769(1)
Self-Referential Classes
769(1)
Linked Lists
770(10)
Stacks
780(2)
Queues
782(2)
Trees
784(13)
Case Study: Online Bookstore
797(70)
Introduction
798(1)
HTTP Sessions and Session-Tracking Technologies
798(2)
Tracking Sessions in the Bookstore
800(5)
Bookstore Architecture
805(2)
Configuring the Bookstore
807(2)
Entering the Bookstore
809(1)
Obtaining the Book List from the Database
810(7)
Viewing a Book's Details
817(4)
Adding an Item to the Shopping Cart
821(2)
Viewing the Shopping Cart
823(5)
Checking Out
828(3)
Processing the Order
831(2)
Error Handling
833(2)
Handling Wireless Clients (XHTML Basic and WML)
835(25)
Introduction to XHTML Basic
836(11)
Introduction to WML
847(13)
Internet and World Wide Web Resources
860(7)
Multimedia
867(50)
Introduction
868(1)
Introduction to PyOpenGL
868(1)
PyOpenGL Examples
869(7)
Introduction to Alice
876(1)
Fox, Chicken and Seed Problem
877(6)
Introduction to pygame
883(1)
Python CD Player
883(7)
Python Movie Player
890(3)
Pygame Space Cruiser
893(16)
Internet and World Wide Web Resources
909(8)
Python Server Pages (PSP)
917(54)
Introduction
918(1)
Python Servlets
919(1)
Python Server Pages Overview
920(1)
First Python Server Page Example
921(3)
Implicit Objects
924(1)
Scripting
924(4)
Scripting Components
925(1)
Scripting Example
925(3)
Standard Actions
928(12)
<xsp:include> Action
929(4)
<xsp:insert> Action
933(3)
<xsp:method> Action
936(4)
Directives
940(7)
page Directive
940(4)
include Directive
944(3)
Case Study: Message Forums with Python and XML
947(19)
Displaying the Forums
949(3)
Adding Forums and Messages
952(9)
Alternations for Browsers Without XML and XSLT Support
961(5)
Internet and World Wide Web Resources
966(5)
A Operator Precedence Chart 971(2)
B ASCII Character Set 973(1)
C Number Systems 974(14)
Introduction
975(3)
Abbreviating Binary Numbers as Octal Numbers and Hexadecimal Numbers
978(2)
Converting Octal Numbers and Hexadecimal Numbers to Binary Numbers
980(1)
Converting from Binary, Octal or Hexadecimal to Decimal
980(1)
Converting from Decimal to Binary, Octal or Hexadecimal
981(1)
Negative Binary Numbers: Two's Complement Notation
982(6)
D Python Development Environments 988(10)
Introduction
989(1)
Integrated Development Environment: IDLE
989(6)
Installing and Launching IDLE
990(1)
Features
991(1)
Text Editor
992(2)
Debugger
994(1)
Other Integrated Development Environments
995(2)
Black Adder
995(1)
Python Works™
996(1)
Wing IDE™
996(1)
Pythonwin
997(1)
Komodo
997(1)
Internet and World Wide Web Resources
997(1)
E Career Opportunities 998(22)
Introduction
999(1)
Resources for the Job Seeker
1000(1)
Online Opportunities for Employers
1001(5)
Posting Jobs Online
1003(2)
Problems with Recruiting on the Web
1005(1)
Diversity in the Workplace
1005(1)
Recruiting Services
1006(1)
Career Sites
1007(5)
Comprehensive Career Sites
1007(1)
Technical Positions
1008(1)
Wireless Positions
1008(1)
Contracting Online
1009(1)
Executive Positions
1010(1)
Students and Young Professionals
1011(1)
Other Online Career Services
1011(1)
Internet and World Wide Web Resources
1012(8)
F Unicode® 1020(12)
Introduction
1021(1)
Unicode Transformation Format (UTF)
1022(1)
Characters and Glyphs
1023(1)
Advantages and Disadvantages of Unicode
1024(1)
Unicode Consortium's Web Site
1024(1)
Using Unicode
1025(2)
Character Ranges
1027(5)
G Introduction to HyperText Markup Language 4: Part 1 1032(23)
Introduction
1033(1)
Markup Languages
1033(1)
Editing HTML
1034(1)
Common Elements
1034(3)
Headers
1037(1)
Linking
1038(2)
Images
1040(4)
Special Characters and More Line Breaks
1044(2)
Unordered Lists
1046(1)
Nested and Ordered Lists
1047(3)
Internet and World Wide Web Resources
1050(5)
H Introduction to HyperText Markup Language 4: Part 2 1055(33)
Introduction
1056(1)
Basic HTML Tables
1056(2)
Intermediate HTML Tables and Formatting
1058(3)
Basic HTML Forms
1061(3)
More Complex HTML Forms
1064(7)
Internal Linking
1071(3)
Creating and Using Image Maps
1074(2)
meta Elements
1076(2)
frameset Element
1078(2)
Nested framesets
1080(2)
Internet and World Wide Web Resources
1082(6)
I Introduction to XHTML: Part 1 1088(26)
Introduction
1089(1)
Editing XHTML
1089(1)
First XHTML Example
1090(3)
W3C XHTML Validation Service
1093(2)
Headers
1095(2)
Linking
1097(2)
Images
1099(4)
Special Characters and More Line Breaks
1103(2)
Unordered Lists
1105(1)
Nested and Ordered Lists
1106(3)
Internet and World Wide Web Resources
1109(5)
J Introduction to XHTML: Part 2 1114(34)
Introduction
1115(1)
Basic XHTML Tables
1115(3)
Intermediate XHTML Tables and Formatting
1118(2)
Basic XHTML Forms
1120(3)
More Complex XHTML Forms
1123(7)
Internal Linking
1130(3)
Creating and Using Image Maps
1133(2)
meta Elements
1135(2)
frameset Element
1137(3)
Nested framesets
1140(2)
Internet and World Wide Web Resources
1142(6)
K Cascading Style Sheets™ (CSS) 1148(33)
Introduction
1149(1)
Inline Styles
1149(1)
Embedded Style Sheets
1150(3)
Conflicting Styles
1153(3)
Linking External Style Sheets
1156(3)
W3C CSS Validation Service
1159(1)
Positioning Elements
1160(3)
Backgrounds
1163(2)
Element Dimensions
1165(2)
Text Flow and the Box Model
1167(5)
User Style Sheets
1172(4)
Internet and World Wide Web Resources
1176(5)
L Accessibility 1181(46)
Introduction
1182(1)
Web Accessibility
1182(1)
Web Accessibility Initiative
1183(2)
Providing Alternatives for Images
1185(1)
Maximizing Readability by Focusing on Structure
1186(1)
Accessibility in XHTML Tables
1186(4)
Accessibility in XHTML Frames
1190(1)
Accessibility in XML
1191(1)
Using Voice Synthesis and Recognition with VoiceXML™
1191(7)
CallXML™
1198(6)
JAWS® for Windows
1204(1)
Other Accessibility Tools
1205(1)
Accessibility in Microsoft® Windows® 2000
1206(14)
Tools for People with Visual Impairments
1208(2)
Tools for People with Hearing Impairments
1210(1)
Tools for Users Who Have Difficulty Using the Keyboard
1210(6)
Microsoft Narrator
1216(1)
Microsoft On-Screen Keyboard
1217(1)
Accessibility Features in Microsoft Internet Explorer 5.5
1218(2)
Internet and World Wide Web Resources
1220(7)
M HTML/XHTML Special Characters 1227(1)
N HTML/XHTML Colors 1228(3)
O Additional Python 2.2 Features 1231(20)
Introduction
1232(1)
Iterators
1232(10)
Generators
1242(5)
Nested Scopes
1247(2)
Internet and World Wide Web Resources
1249(2)
Bibliography 1251(2)
Index 1253

Excerpts

Live in fragments no longer. Only connect. Edward Morgan ForsterWelcome to the world of Python programming! Python is a powerful general-purpose programming language that is extremely effective for developing Internet and Web-based, database intensive, multi-tier, client/server systems. This book presents a great variety of leading edge computing technologies, and is our second book on open-source programming languages.As we write these words, Python 2.2 has just been released, almost to the minute! We have worked hard to incorporate the 2.2 functionality throughout the book. Appendix O presents a few additional 2.2 features.We hope you will findPython How to Programeducational, entertaining and challenging. It was a joy to work on this project. The team at Deitel & Associates develops programming language textbooks and e-Learning materials. We work in almost every major programming language. We noticed something special while working on this book. Our developers and writers commented on how much they like Python. They appreciate its power, its readability and its conciseness. They like its pizzazz. They like the world of open-source software development that is generating an ever-growing base of modules.Whether you are an instructor, a student, an experienced professional programmer or a novice, this book has much to offer you. Python is an excellent first programming language and is an equally excellent language for developing industrial-strength, commercial applications. For the student and the novice programmer, the early chapters of the book establish a solid foundation in the basics of programming. We discuss many programming models including structured programming, object-based programming, object-oriented programming and event-driven programming. For the professional developer, we have employed the "heavy-duty" Python functionality to create substantial, fully implemented systems. The capstone is the case study on building an online bookstore in Chapter 23--this occupies approximately 70 pages of the text.The standard basic topics are all here--data types, operators, control structures, arithmetic, strings, decision making, algorithm development, functions, and random numbers and simulation.The book features a solid treatment of data structures with an early introduction to Python's built-in structures-lists, tuples and dictionaries-and a later rigorous treatment of traditional data structures including queues, stacks, linked lists and binary trees.The book emphasizes Internet and Web development--we feature an early introduction to CGI then use it in several chapters to build Web-based applications. We include a full-chapter treatment of PSP (Python Server Pages) where we re-engineer the message forum case study presented in Chapter 16.The book features a detailed, three-chapter treatment of object-oriented programming covering classes, encapsulation, objects, attributes, methods, constructors, destructors, customization, operator overloading, inheritance, base classes, derived classes and polymorphism.We include a thorough treatment of graphical user interface (GUI) programming, with Tkinter , using event-driven programming, labels, buttons, check buttons, radio buttons, mouse-event handling, keyboard-event handling, layout managers, and a whole range of advanced GUI capabilities for creating and manipulating menus and scrolling components.We discuss exception handling for making programs more robust. We present a substantial treatment of Python's powerful string-manipulation capabilities and we tackle head-on the difficult--yet enormously powerful--topic of regular expressions.We discuss file processing, sequential access files, random-access files (and the shelve module). We develop a transacti

Rewards Program

Write a Review