Python How to Program / Edition 1

Python How to Program / Edition 1

by Harvey M. Deitel, Paul Deitel, Jonathan P. Liperi, Ben Wiedermann
     
 

ISBN-10: 0130923613

ISBN-13: 9780130923615

Pub. Date: 02/28/2002

Publisher: Prentice Hall

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 selling How to Program books. Like all of the Deitels' How to Program

…  See more details below

Overview

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 selling How to Program books. Like all of the Deitels' How to Program books, Python How to Program features the Deitels' signature Live-CodeÀTM Approach: thousands of lines of live code, explained with exceptional clarity by the renowned programming trainers of Deitel & Associates. Python How to Program covers 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.

NOTE: 2 Volume Set

Read More

Product Details

ISBN-13:
9780130923615
Publisher:
Prentice Hall
Publication date:
02/28/2002
Series:
How to Program Ser.
Edition description:
BK&CD-ROM
Pages:
1376
Product dimensions:
7.00(w) x 9.00(h) x 2.80(d)

Table of Contents

(NOTE: Each chapter begins with an Introduction.)

1. Introduction to Computers, Internet and World Wide Web.

What Is a Computer? Computer Organization. Evolution of Operating Systems. Personal Computing, Distributed Computing and Client/Server Computing. Machine Languages, Assembly Languages and High-Level Languages. Structured Programming. Object-Oriented Programming. Hardware Trends. History of the Internet and World Wide Web. World Wide Web Consortium (W3C). Extensible Markup Language (XML). Open-Source Software Revolution. History of Python. Python Modules. General Notes about Python and This Book. Tour of the Book. Internet and World Wide Web Resources.

2. Introduction to Python Programming.

First Program in Python: Printing a Line of Text. Modifying our First Python Program. Another Python Program: Adding Integers. Memory Concepts. Arithmetic. String Formatting. Decision Making: Equality and Relational Operators. Indentation. Thinking About Objects: Introduction to Object Technology.

3. Control Structures.

Algorithms. Pseudocode. Control Structures. if Selection Structure. if/else and if/elif/else Selection Structures. while Repetition Structure. Formulating Algorithms: Case Study 1: (Counter-Controlled Repetition). Formulating Algorithms with Top-Down, Stepwise Refinement: Case Study 2: (Sentinel-Controlled Repetition). Formulating Algorithms with Top-Down, Stepwise Refinement: Case Study 3: (Nested Control Structures). Augmented Assignment Symbols. Essentials of Counter-Controlled Repetition. for Repetition Structure. Using the for Repetition Structure. break and continue Statements. Logical Operators. Structured-Programming Summary.

4. Functions.

Program Components in Python. Functions. Module math Functions. Function Definitions. Random-Number Generation. Example: A Game of Chance. Scope Rules. Keyword import and Namespaces. Recursion. Example Using Recursion: The Fibonacci Series. Recursion vs Iteration. Default Arguments. Keyword Arguments.

5. Lists, Tuples and Dictionaries.

Sequences. Creating Sequences. Using Lists and Tuples. Dictionaries. List and Dictionary Methods. References and Reference Parameters. Passing Lists to Functions. Sorting and Searching Lists. Multiple-Subscripted Sequences.

6. Introduction to the Common Gateway Interface (CGI).

Client and Web Server Interaction. Simple CGI Script. Sending Input to a CGI Script. Using XHTML Forms to Send Input and Using Module cgi to Retrieve Form Data. Using cgi FieldStorage to Read Input. Other HTTP Headers. Example: Interactive Portal. Internet and World Wide Web Resources.

7. Object-Based Programming.

Implementing a Time Abstract Data Type with a Class. Special Attributes. Controlling Access to Attributes. Using Default Arguments with Constructors. Destructors. Class Attributes. Composition: Object References as Members of Classes. Data Abstraction and Information Hiding. Software Reusability.

8. Customizing Classes.

Customizing String Representation: Method__str__ Customizing Attribute Access. Operator Overloading. Restrictions on Operator Overloading. Overloading Unary Operators. Overloading Binary Operators. Overloading Built-in Functions. Converting Between Types. Case Study: A Rational Class. Overloading Sequence Operations. Case Study: A SingleList Class. Overloading Mapping Operations. Case Study: A SimpleDictionary Class.

9. Object-Oriented Programming: Inheritance.

Inheritance: Base Classes and Derived Classes. Creating Base Classes and Derived Classes. Overriding Base-Class Methods in a Derived Class. Software Engineering with Inheritance. Composition vs Inheritance. “Uses A” and “Knows A” Relationships. Case Study: Point, Circle, Cylinder. Abstract Base Classes and Concrete Classes. Case Study: Inheriting Interface and Implementation. Polymorphism. Classes and Python 2.2.

10. Graphical User Interface Components: Part 1.

Tkinter Overview ~. Simple Tkinter Example: Label Component. Event Handling Model. Entry Component. Button Component. Checkbutton and Radiobutton Components. Mouse Event Handling. Keyboard Event Handling. Layout Managers. Card Shuffling and Dealing Simulation. Internet and World Wide Web Resources.

11. Graphical User Interface Components: Part 2.

Overview of Pmw. ScrolledListbox Component. ScrolledText Component. MenuBar Component. Popup Menus. Canvas Component. Scale Component. Other GUI Toolkits.

12. Exception Handling.

Raising an Exception. Exception-Handling Overview. Example: DivideByZeroError. Python Exception Hierarchy. finally Clause. Exception Objects and Tracebacks. Programmer-Defined Exception Classes.

13. String Manipulation and Regular Expressions.

Fundamentals of Characters and Strings. String Presentation. Searching Strings. Joining and Splitting Strings. Regular Expressions. Compiling Regular Expressions and Manipulating Regular-Expression Objects. Regular-Expression Repetition and Placement Characters. Classes and Special Sequences. Regular Expression String-Manipulation Functions. Grouping. Internet and World Wide Web Resources.

14. File Processing and Serialization.

Data Hierarchy. Files and Streams. Creating a Sequential-Access File. Reading Data from a Sequential-Access File. Updating Sequential-Access Files. Random-Access Files. Simulating a Random-Access File: The shelve Module. Writing Data to a shelve File. Retrieving Data from a shelve File. Example: A Transaction-Processing Program. Object Serialization.

15. Extensible Markup Language (XML).

XML Documents. XML Namespaces. Document Object Model (DOM). Simple API for XML (SAX). Document Type Definitions (DTDs), Schemas and Validation. XML Vocabularies. Extensible Stylesheet Language (XSL). Internet and World Wide Web Resources.

16. Python XML Processing.

Generating XML Content Dynamically. XML Processing Packages. Document Object Model (DOM). Parsing XML with xml.sax. Case Study: Message Forums with Python and XML. Internet and World Wide Web Resources.

17. Database Application Programming Interface(DB-API).

Relational Database Model. Relational Database Overview: Books Database. Structured Query Language (SQL). Python DB-API Specification. Database Query Example. Querying the Books Database. Reading, Inserting and Updating a Database. Internet and World Wide Web Resources.

18. Process Management.

os.fork Function. os.system Function and os.exec Family of Functions. Controlling Process Input and Output. Interprocess Communication. Signal Handling. Sending Signals.

19. Multithreading.

Thread States: Life Cycle of a Thread. threading. ThreadExample. Thread Synchronization. Producer/Consumer Relationship without Thread Synchronization. Producer/Consumer Relationship with Thread Synchronization. Producer/Consumer Relationship: Module Queue. Producer/Consumer Relationship: The Circular Buffer. Semaphores. Events.

20. Networking.

Accessing URLs over HTTP. Establishing a Simple Server (Using Stream Sockets). Establishing a Simple Client (Using Stream Sockets). Client/Server Interaction with Stream Socket Connections. Connectionless Client/Server Interaction with Datagrams. Client/Server Tic-Tac-Toe Using a Multithreaded Server.

21. Security.

Ancient Ciphers to Modern Cryptosystems. Secret-Key Cryptography. Public-Key Cryptography. Cryptanalysis. Key-Agreement Protocols. Key Management. Digital Signatures. Public-Key Infrastructure, Certificates and Certificate Authorities. Security Protocols. Authentication. Security Attacks. Running Restricted Python Code. Network Security. Steganography. Internet and World Wide Web Resources.

22. Data Structures.

Self-Referential Classes. Linked Lists. Stacks. Queues. Trees.

23. Case Study: Online Bookstore.

HTTP Sessions and Session-Tracking Technologies. Tracking Sessions in the Bookstore. Bookstore Architecture. Configuring the Bookstore. Entering the Bookstore. Obtaining the Book List from the Database. Viewing a Book's Details. Adding an Item to the Shopping Cart. Viewing the Shopping Cart. Checking Out. Processing the Order. Error Handling. Handling Wireless Clients (XHTML Basic and WML). Internet and World Wide Web Resources.

24. Multimedia.

Introduction to PyOpenGL. PyOpenGL Examples. Introduction to Alice. Fox, Chicken and Seed Problem. Introduction to pygame. Python CD Player. Python Movie Player. Pygame Space Cruiser. Internet and World Wide Web Resources.

25. Python Server Pages (PSP).

Python Servlets. Python Server Pages Overview. First Python Server Page Example. Implicit Objects. Scripting. Standard Actions. Directives. Case Study: Message Forums with Python and XML. Internet and World Wide Web Resources.

Appendix A. Operator Precedence Chart.

Appendix B. ASCII Character Set.

Appendix C. Number Systems.

Introduction. Abbreviating Binary Numbers as Octal Numbers and Hexadecimal Numbers. Converting Octal Numbers and Hexadecimal Numbers to Binary Numbers. Converting from Binary, Octal or Hexadecimal to Decimal. Converting from Decimal to Binary, Octal or Hexadecimal. Negative Binary Numbers: Two's Complement Notation.

Appendix D. Python Development Environments.

Introduction. Integrated Development Environment: IDLE. Other Integrated Development Environments. Internet and World Wide Web Resources.

Appendix E. Career Opportunities.

Introduction. Resources for the Job Seeker. Online Opportunities for Employers. Recruiting Services. Career Sites. Internet and World Wide Web Resources.

Appendix F. Unicode®.

Introduction. Unicode. Characters and Glyphs. Advantages and Disadvantages of Unicode. Unicode Consortium's Web Site. Using Unicode. Character Ranges.

Appendix G. Introduction to HyperText Markup Language 4: Part 1.

Introduction. Markup Languages. Editing HTML. Common Elements. Headers. Linking. Images. Special Characters and More Line Breaks. Unordered Lists. Nested and Ordered Lists. Internet and World Wide Web Resources.

Appendix H. Introduction to HyperText Markup Language 4: Part 2.

Introduction. Basic HTML Tables. Intermediate HTML Tables and Formatting. Basic HTML Forms. More Complex HTML Forms. Internal Linking. Creating and Using Image Maps. meta Elements. frameset Element. Nested framesets. Internet and World Wide Web Resources.

Appendix I. Introduction to XHTML: Part 1.

Introduction. Editing XHTML. First XHTML Example. W3C XHTML Validation Service. Headers. Linking. Images. Special Characters and More Line Breaks. Unordered Lists. Nested and Ordered Lists. Internet and World Wide Web Resources.

Appendix J. Introduction to XHTML: Part 2.

Introduction. Basic XHTML Tables. Intermediate XHTML Tables and Formatting. Basic XHTML Forms. More Complex XHTML Forms. Internal Linking. Creating and Using Image Maps. meta Elements. framese Element. Nested framesets. Internet and World Wide Web Resources.

Appendix K. Cascading Style Sheets™ (CSS).

Introduction. Inline Styles. Embedded Style Sheets. Conflicting Styles. Linking External Style Sheets. W3C CSS Validation Service. Positioning Elements. Backgrounds. Element Dimensions. Text Flow and the Box Model. User Style Sheets. Internet and World Wide Web Resources.

Appendix L. Accessibility.

Introduction. Web Accessibility. Web Accessibility Initiative. Providing Alternatives for Images. Maximizing Readability by Focusing on Structure. Accessibility in XHTML Tables. Accessibility in XHTML Frames. Accessibility in XML. Using Voice Synthesis and Recognition with VoiceXML™. Cal1XML™. JAWS® for Windows. Other Accessibility Tools. Accessibility in Microsoft® Windows® 2000. Internet and World Wide Web Resources.

Appendix M. HTML/XHTML Special Characters.

Appendix N. HTML/XHTML Colors.

Appendix O. Additional Python 2.2 Features.

Introduction. Iterators. Generators. Nested Scopes. Internet and World Wide Web Resources.

Bibliography.

Index.

Read More

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >