Home > Store

Python How to Program

Register your product to gain access to bonus material or receive a coupon.

Python How to Program

Book

  • Sorry, this book is no longer in print.
Not for Sale

About

Features

  • Signature “Live-Code™ Approach”—Language features are presented in the context of a wide variety of complete working programs. Features thousands of lines of code in hundreds of complete working programs.
    • Enables students to confirm that programs run as expected. Students can also manipulate the code from the book's Companion Website and the authors' website (www.deitel.com).

  • Outstanding, consistent and applied pedagogy—Icons throughout identify Software Engineering Observations; Good Programming Practices; Common Programming Errors; Portability Tips; Performance Tips, Testing and Debugging Tips, and Look-and-Feel Observations.
    • Provides hundreds of valuable programming tips and facilitates learning.

  • Extensive set of interesting exercises and substantial projects.
    • Students can apply what they've learned in each chapter.

  • Extensive case studies.
    • Illustrates the more complex real-world examples.

  • Four-way syntax coloring with the use of two colors and shading.
    • Helps students better understand the book's hundreds of programs.

  • Full chapter on Web accessibility for people with disabilities.
    • Discusses the methods that the World Wide Web Consortium provides in its Web Accessibility Initiative for making a Web site accessible to people with disabilities.

  • Also available with the Multimedia Cyber Classroom in The Complete Python Training Course, Student Edition ; Web-based version: 0-13-067381-1).
    • Provides extra hands-on experience and study aids for a minimal additional cost. Includes many hours of detailed, expert audio walkthroughs of the book's hundreds of live-code examples; post-assessment exams with hundreds of short-answer questions (all with answers), hundreds of self-review exercises drawn from the text all with answers), hundreds of programming exercises from the main text (these exercises don't have answers in the main text, but half of these exercises have answers in the Complete Training Course); hundreds of tips that are marked with icons and show how to write Python code that's portable, reusable, and optimized for performance; and full-text searching and hyperlinking.

Each How to Program text can be ordered as a Complete Training Course package, containing the main text and the corresponding Cyber Classroom—an interactive, multimedia, tutorial version of the book. The Complete Training Courses are a great value, giving students extra hands-on experience and study aids for a minimal additional cost.

Each Complete Training Course is compatible with Windows 95, Windows 98, Windows NT and Windows 2000 and includes the following features:

  • The full text, illustrations and program listings of its corresponding How to Program book with full-text searching and hyperlinking.
  • Hours of detailed, expert audio descriptions of thousands of lines of code that help to reinforce concepts.
  • An abundance of self-assessment material:
    • Practice exams that offer students hundreds of short-answer test questions and answers.

    • Hundreds of self-review questions that are drawn from the text, all with answers.

    • Hundreds of programming exercises that are drawn from the text, half with answers (the main text does not provide any answers to these exercises).

  • Intuitive browser-based interface, designed to be easy and accessible for anyone who's ever used a Web browser.

We offer the Complete Training Courses in a Web-based format. When professors order the Web-based version of a Complete Training Course, their students receive the corresponding How to Program book packaged with a URL and password that gives them six months of access to the Cyber Classroom software via the Web.

Description

  • Copyright 2002
  • Dimensions: 7" x 9-1/8"
  • Pages: 1376
  • Edition: 1st
  • Book
  • ISBN-10: 0-13-092361-3
  • ISBN-13: 978-0-13-092361-5

NOTE: This title published in 2002. Python has had numerous updates since and information in this book may be outdated.

For Python programming courses or Web programming courses focusing on Python programming found in departments of Computer Science, CIS, MIS, IT, Business, Engineering and Continuing Education.

An exciting addition to the How to Program series, Python How to Program provides a comprehensive introduction to this powerful object-oriented programming language, which has clear syntax and the ability to bring together several technologies quickly and easily. Python How to Program covers introductory programming techniques as well as more advanced topics such as graphical user interfaces, databases, wireless Internet programming, networking and multimedia. Students will learn principles that are applicable to both systems development and Web programming.

NOTE: 2 Volume Set

Sample Content

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.

Preface

Live in fragments no longer. Only connect.
Edward Morgan Forster

Welcome 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 find Python How to Program educational, 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 transaction-processing program and consider object serialization. The discussions of file processing provide a nice lead-in to our treatment of database programming with Python's Database Application Programming Interface (DB-API). We discuss the relational database model and present an introduction to SQL (Structured Query Language).

Many people are familiar with HTML; yet few know that the World Wide Web Consortium—creator of HTML technology—has declared HTML to be a legacy technology that will undergo no further development. Nevertheless, HTML is still important, so we have provided two appendices on it. The world is evolving towards XML (eXtensible Markup Language). In the interim, contemporary Web development is using a transition technology called XHTML. We present two appendices on this important subject and use XHTML in various applications throughout the book. We present a chapter-length general introduction to XML, an absolute must subject for today's Web applications developers. We then include a full-chapter treatment of Python-specific XML processing and include a detailed case study in which we use CGI and XML to build message forums.

Computer applications have generally been good at doing one thing at a time; today's more sophisticated applications need to be able to do many things in parallel, or as we prefer to say in the computer field—concurrently. We provide full chapters on process management and multithreading. These technologies give the Python applications programmer capabilities that used to be available only to systems programmers working down at the operating systems level.

We discuss networking, including the HTTP protocol of the Web, client/server networking with stream sockets, connectionless client/server interaction using datagrams, and we implement a client/server tic-tac-toe game using a multithreaded server.

We present a thorough general discussion of computer security, then deal with some Python-specific security issues. We discuss executing potentially harmful code in a restricted environment using module Bastion. We demonstrate encrypting text with module rotor.

As a capstone exercise for the book, in Chapter 23 we present a detailed case study that implements online bookstore e-business using a great many technologies discussed in the earlier chapters and the appendices. We introduce HTTP sessions and session tracking and build our bookstore as a mufti-tier, client/server system able to handle a variety of clients, including a standard Web browser (using XHTML) and wireless clients (using WML and XHTML Basic).

We present a full chapter on multimedia, including an introduction to PyOpenGL with 3-D graphics examples and an introduction to Alice, a 3D environment that provides objects which can be animated with Python scripts. We demonstrate pygame by designing a CD player, a movie player and a space-cruiser game.

Recognizing the importance of server-side development, we introduce PSP (Python Server Pages) as an alternative to CGI, and we convert the message forum case study from CGI technology to PSP.

The book is loaded with valuable appendices, including the Operator Precedence Chart, ASCII Character Set, Number Systems (binary, octal, decimal, hexadecimal), Python Development Environments, HTML, XHTML, CSS (Cascading Style Sheets), Career Opportunities (with lots of Web resources) and Unicode. We include an appendix on Accessibility (which overviews issues affecting, and resources for, people with disabilities). We close with an appendix on Additional Python 2.2 Features, including discussions on iterators, generators and nested scopes.

As you read this book, if you have an questions, just send an e-mail to deitel@deitel.com. We will respond promptly. Please visit with us from time to time at www.deitel.com and be sure to sign up there for The DEITEL BUZZ e-mail newsletter. We use the Web site and the newsletter to keep our readers up to the minute on Python and our products and services.

Features in Python How to Program

This text contains many additional features, including:

  • "Code Washing." This is our term for the process we use to format the programs in the book so that they have a carefully commented, open layout. Python How to Program code appears in two colors with easy-to-read, syntax highlighting, including Python keywords, strings and comments. Program code is grouped into small, well-documented pieces. This greatly improves code readability—an especially important goal for us, considering that this book contains 14,930 lines of code.
  • Object-Oriented Programming. Object-oriented programming is the most widely employed technique for developing robust, reusable software. Python was designed to be an object-oriented language, and this text offers a rigorous discussion of Python's various object-oriented features. Data integrity is of particular concern in Python. All Python class data is public by default, but several techniques exist for ensuring data integrity. We discuss these and other object-oriented topics over three detailed chapters. Chapter 7, Object-Based Programming, introduces how to create classes and discusses public, "private" and get/set methods. Chapter 8, Customizing Classes, discusses how to create classes with customized behavior, such as operator overloading, string representation, list and dictionary behavior and methods for customizing attribute access. These concepts are extended in Chapter 9, Object-Oriented Programming: Inheritance, in which we discuss how programmers can create new classes that "absorb" the capabilities of existing classes. This chapter familiarizes the reader with the crucial concepts of polymorphism, abstract classes and concrete classes, which facilitate powerful manipulations of objects belonging to an inheritance hierarchy. The chapter concludes with a discussion of additional object-oriented capabilities available in Python 2.2, including properties.
  • Database Application Programming Interface. Databases store vast amounts of information that individuals and organizations must access to conduct business. Database management systems (DBMS) are used by organizations and individuals to manipulate databases—Python offers the database application programming interface (DB-API) to access database management systems. Chapter 17, Database Applications Programming Interface (DB-API), details these capabilities and the Structured Query Language (SQL) to query MySQL databases.
  • XML. Use of Extensible Markup Language (XML) is exploding in the software-development industry, and in the e-business and e-commerce communities. Because XML is a platform-independent technology for describing data and for creating markup languages, XML's data portability integrates well with Python's portable applications and services. Chapter 15, Extensible Markup Language (XML), introduces XML. In this chapter, we discuss basic XML markup and technologies such as DTDs and Schema, which are used to validate XML document contents. In Chapter 16, Python XML Processing, we explain how to manipulate XML documents using the Document Object Model (DOM) and how to transform XML documents into other types of documents via Extensible Stylesheet Language Transformations (XSLT). This chapter also presents an alternative to DOM, called Simple API for XML (SAX), which acts as an event-based API for XML.
  • Common Gateway Interface (CGI) and Python Server Pages (PSP). The Internet and World Wide Web are pervasive in today's world, and interactive Web sites are crucial for businesses. Chapter 6, Introduction to the Common Gateway Interface (CGI), and Chapter 25, Python Server Pages (PSP), provide server-side Web technologies with which developers create interactive Web-based applications. A detailed case study in Chapter 23, Case Study: Online Bookstore, employs MySQL, XML, XHTML, XHTML Basic, Cascading Stylesheets, XSLT, CGI and the Wireless Markup Language (WML) to construct a dynamic e-commerce application. The book demonstrates two implementations of an XML message forum in which users post messages to an online message board. The version in Chapter 16 uses CGI, and the version in Chapter 25 uses PSP.
  • Graphical User Interface (GUI). Python does not have built-in graphical user interface capabilities, but many modules are available that provide access to existing GUI software. Chapter 10, Graphical User Interface Components: Part 1, and Chapter 11, Graphical User Interface Components: Part 2, discuss the Tkinter module (included in the Python standard library) that provides a Python programmer access to the Tool Command Language/Tool Kit (Tcl/Tk), a popular GUI toolkit. Using these programming tools, a developer can create graphical programs quickly and easily. These chapters provide the reader with the ability to program the GUI portions of the programs in the rest of the text. Chapter 11 also discusses module Pmw, which uses Tkinter to provide more complex GUI components.
  • Multimedia. Multimedia capabilities produce powerful applications using sound and color, thereby enhancing users' experiences. Several Python modules are available for creating impressive multimedia applications. Chapter 24, Multimedia, explores the capabilities of PyOpenGL and Alice for creating and animating 3D graphics. The chapter also discusses pygame, which contains modules that enable a developer to access powerful multimedia libraries. Chapter 24 uses pygame to create a compact-disc player, a computer game and a video-player application.
  • Multithreading and Process Management. Computers can perform many tasks concurrently (i.e., in parallel), such as printing documents, downloading files from a network and surfing the Web. Multithreading is a technology through which programmers can develop applications that perform concurrent tasks. Python's multithreading and process management capabilities are appropriate for today's sophisticated multimedia-intensive, database-intensive, network-based, multiprocessor-based, distributed applications. Chapter 18, Process Management, discusses concurrency and interprocess communication, and Chapter 19, Multithreading, provides a detailed discussion of multithreading, including an explanation of Python's Global Interpreter Lock, which controls and manages thread execution. The chapter also introduces common thread synchronization mechanisms in the context of several examples.
  • File Processing and Serialization. Most industrial applications read and write data to a disk. Python provides several high-level capabilities for data storage and retrieval. In Chapter 14, File Processing and Serialization, we discuss basic file objects for the storage of sequential data; shelve objects for the storage of random-access data and module cPickle for serializing entire objects to a disk.
  • XHTML. The World Wide Web Consortium (W3C) has declared HTML to be a legacy technology that will undergo no further development. HTML is being replaced by the Extensible Hypertext Markup Language (XHTML)—an XML-based technology that is rapidly becoming the standard for describing Web content. We use XHTML in Chapter 6, Introduction to the Common Gateway Interface (CGI); Chapter 16, Python XML Processing; Chapter 17, Database Application Programming Interface (DB-API); Chapter 23, Case Study: Online Bookstore and Chapter 25, Python Server Pages (PSP). We introduce the technology in Appendix I, Introduction to XHTML: Part 1, and Appendix J, Introduction to XHTML: Part 2. These appendices overview headers, images, lists, image maps and other features of this emerging markup language. (We also present a treatment of HTML in Appendices G and H, because the message forums in Chapter 16 and Chapter 25 use scripts that generate HTML).
  • Career Opportunities. Appendix E, Career Resources, introduces career services available on the Internet. We explore online career services from both the employer's and employee's perspectives. We list many Web sites at which you can submit applications, search for jobs and review applicants (if you are interested in hiring someone). We also review services that build recruiting pages directly into e-businesses. One of our reviewers told us that he had used the Internet as a primary tool in a recent job search, and that this appendix would have helped him expand his search dramatically.
  • Unicode. As computer systems evolved worldwide, computer vendors developed numeric representations of character sets and special symbols for the local languages spoken in different countries. In some cases, different representations were developed for the same languages. Such disparate character sets hindered communication among computer systems. Python supports the Unicode Standard, which is developed and maintained by a non-profit organization called the Unicode Consortium). This standard contains a single character set that specifies unique numeric values for characters and special symbols in most of the world's languages. Appendix F, Unicode, discusses the standard, overviews the Unicode Consortium Web site (www.unicode.org) and presents a Python application that displays "Welcome to Unicode!" in many languages.
  • Accessibility. Using the Web presents many challenges to people with disabilities. Individuals with hearing and visual impairments, in particular, have difficulty accessing multimedia-rich Web sites. In an attempt to improve this situation, the World Wide Web Consortium (W3C) launched the Web Accessibility Initiative (WAI), which provides guidelines for making Web sites accessible to people with disabilities. Appendix L, Accessibility, describes these guidelines and highlights various products and services designed to improve the Web-browsing experiences of individuals with disabilities. For example, the chapter introduces VoiceXML and CallXML—two XML-based technologies for increasing the accessibility of Web-based content for people with visual impairments.

This text provides many other topics in addition to the features previously listed. For a complete list of each chapter's features, visit page 15 of Chapter 1, Tour of the Book.

Python Version 2.2 Features

This text went to publication at the same time that the final version of Python 2.2 was released. However, all the code examples in this book were tested in Python 2.2b2 (Python Version 2.2 Beta 2) and with Release Candidate 1, on both the Windows and Linux operating systems, and the text demonstrates 2.2 features and functionality in every applicable chapter. This section overviews the 2.2 capabilities presented in Python How to Program.

Floor Division and True Division. Python 2.2 introduces a new operator (//) for "floor" (integer) division. In the current and previous versions of Python, the default behavior of the / division operator is floor division; in future versions, the default behavior will be "true" (floating-point) division. By defining two division operators, the new versions of Python eliminates the type ambiguity that results in programs that use both integer and floating-point values for division. Section 2.6 discusses the difference between floor division and true division and explains how a program can change the default behavior of the / operator to perform true division.

Nested Scopes. Python 2.2 introduces nested scopes, which means that nested classes, methods and functions now have access to variables defined in their enclosing scope. This behavior is particularly helpful for writing lambda lambda expressions. Chapter 4 discusses Python's basic scoping rules and provides a footnote that contains a Web resource for further information on nested scopes. The nested scoping behavior is most important to programmers who use Python in a functional-programming idiom. We also discuss nested scopes in Appendix O, Additional Python features. As this book focuses mainly on the object-oriented style of programming, we provide only a high-level motivation for nested scopes and suggest further resources where the reader can learn more about nested scopes and functional programming in Python.

More Object-Oriented Functionality. Most of the new features in Python 2.2 add more object-oriented functionality to the language. Chapters 8 and 9 introduce several of these new features. In Chapter 8, we discuss the methods that a programmer-defined class can overload to define behavior for operators, including the new // operator. We also introduce a dictionary method, new to 2.2, that enables programs to use if/in statements to test whether a dictionary contains a particular key. In Chapter 9, we discuss the most anticipated new feature—the ability for programmer-defined classes to inherit from built-in types. We present a substantial example that inherits from built-in type list to implement a programmer-defined list that contains only unique elements. We also discuss other new object-oriented features, including static methods,__ slots__ (for defining the attributes an object of a class may contain), method__getattribute__(that executes each time a client accesses an object's attribute) and properties (that allow classes to define get/set methods that execute when a client accesses an attribute).

Iterators. Appendix O contains additional 2.2 features that are not covered in the main text. We begin with a thorough treatment of iterators—special objects for progressing through the values of a sequence. Section 0.2 contains two examples that present programmer-defined iterator classes and demonstrate a client of the class using an iterator to obtain values from a sequence. The first example illustrates how to define a class whose objects support iterators; the second example presents a computer guessing game that shows how iterators can be used to process sequences of indeterminate size. The new iterator mechanism in Python 2.2 enables the language to provide a significant performance enhancement over previous versions and improves software design by allowing programmers to separate iteration behavior from random-access behavior.

Generators. Generators also provide new performance and design benefits. A generator is a "resumable function" that remembers its state between invocations. Often, a program writes a generator to define how to produce elements of a sequence in a simple, straightforward manner. Generators also are useful for performing recursive tasks or tasks that would require complex logic and state information to implement with "traditional" functions. Section 0.2 discusses generators in the context of these issues and defines two versions of a generator that computes the Fibonacci sequence. The first version produces the next value in the sequence indefinitely; the second produces all the sequence values up through and including a user-defined nth value.

Some Notes to Instructors

Students Enjoy Learning a Leading-Edge Language
Students are highly motivated by the fact that they are learning a leading-edge language, Python, and a leading-edge programming paradigm (object-oriented programming) that will be immediately useful to them as they enter the business world. This increases their enthusiasm for the material—which is essential when you consider that there is much more to learn in a Python course now that students must master both the base language and substantial modules as well.

A World of Object Orientation
In the late 1990s, universities were still emphasizing procedural programming. The leading-edge courses were using object-oriented C++, but these courses generally mixed a substantial amount of procedural programming with object-oriented programming—something that C++ lets programmers do. Many instructors now are emphasizing a pure object-oriented programming approach. This book takes a predominantly object-oriented approach because of the object orientation provided in Python.

Focus of the Book
Our goal was clear: Produce a Python textbook for introductory-level university courses in computer programming aimed at students with little or no programming experience, yet offer the depth and the rigorous treatment of theory and practice demanded by both professionals and students in traditional, upper-level programming courses. To meet these objectives, we produced a comprehensive book that patiently teaches the principles of computer programming and of the Python language, including control structures, object-oriented programming, Python modules, graphical-user-interface concepts, event-driven programming and more. After mastering the material in this book, students will be well-prepared to program "industrial-strength" applications in Python.

Multimedia-Intensive Communications
People want to communicate. Sure, they have been communicating since the dawn of civilization, but the potential for information exchange has increased dramatically with the evolution of various technologies. Until recently, even computer communications were limited mostly to digits, alphabetic characters and special characters. The current wave of communication technology involves the distribution of multimedia—people enjoy using applications that transmit color pictures, animations, voices, audio clips and even full-motion color video over the Internet. At some point, we will insist on three-dimensional, moving-image transmission.

There have been predictions that the Internet will eventually replace radio and television as we know them today. Similarly, it is not hard to imagine newspapers, magazines and books delivered to "the palm of your hand" (or even to special eyeglasses) via wireless communications. Many newspapers and magazines already offer Web-based versions, and some of these services have spread to the wireless world. When cell phones were first introduced, they were large and cumbersome. Today, they are small devices that fit in our pockets, and many are Internet-enabled. Wireless technology already enables streaming-video and graphics-intensive services, such as video conference calls and multi-player video games. Chapter 23, Case Study: Online Bookstore and Chapter 24, Multimedia demonstrate the possibilities of wireless Internet and multimedia applications.

Teaching Approach

Python How to Program contains a rich collection of examples, exercises and projects drawn from many fields and designed to provide students with a chance to solve interesting, real-world problems. The code examples in this text have been tested on Windows 2000 and Linux. The book concentrates on the principles of good software engineering, and stresses program clarity. We are educators who teach edge-of-the-practice topics in industry classrooms worldwide. We avoid arcane terminology and syntax specifications in favor of teaching by example. The text emphasizes good pedagogy.

LIVE-CODE Teaching Approach
Python How to Program is loaded with numerous examples. This style exemplifies the way we teach and write about programming and is the focus of our multimedia Cyber Classrooms and Web-based training courses. Each new concept is presented in the context of a complete, working example that is immediately followed by one or more windows showing the program's input/output dialog or graphical display. We call this method of teaching and writing the LIVE-CODE Approach. We use programming languages to teach programming languages. Reading the examples in the text is much like entering and running them on a computer.

World Wide Web Access
All of the examples for Python How to Program (and our other publications) are available on the Internet free for download from the following Web sites:

Registration is quick and easy. We suggest downloading all the examples, then running each program as you read the corresponding text. Make changes to the examples and immediately see the effects of those changes—this is a great way to learn programming. We also provide instructions for installing various software used in this book (e.g., Apache Software Foundation's Apache Web Server). Additional setup instructions for other Web servers and software can be found at our Web sites with the examples. Note: This is copyrighted material. Feel free to use it as you study, but you may not republish any portion of it in any form without explicit permission from Prentice Hall and the authors.

Objectives
Each chapter begins with objectives that inform students of what to expect and give them an opportunity, after reading the chapter, to determine whether they have met the intended goals. The objectives serve as confidence builders and as a source of positive reinforcement.

Quotations
The chapter objectives are followed by sets of quotations. Some are humorous, some are philosophical and some offer interesting insights. We have found that students enjoy relating the quotations to the chapter material. Many of the quotations are worth a "second look" after you read each chapter.

Outline
The chapter outline enables students to approach the material in top-down fashion. Along with the chapter objectives, the outline helps students anticipate future topics and set a comfortable and effective learning pace.

Approximately 14,930 Lines of Code in 281 Example Programs (with Program Outputs)
We present Python features in the context of complete, working Python programs. The programs range in size from just a few lines of code to substantial examples containing several hundred lines of code. All examples are available on the book's CD or free for download at www.deitel.com.

589 Illustrations/Figures
An abundance of charts, line drawings and program outputs is included. The discussion of control structures, for example, features carefully drawn flowcharts. Note: We do not teach flowcharting as a program-development tool, but we do use a brief, flowchart-oriented presentation to explain the precise operation of each Python control structure.

412 Programming Tips
We have included programming tips to help students focus on important aspects of program development. We highlight hundreds of these tips in the form of Good Programming Practices, Common Programming Errors, Testing and Debugging Tips, Performance Tips, Portability Tips, Software Engineering Observations and Look-and-Feel Observations. These tips and practices represent the best the authors have gleaned from a combined seven decades of programming and teaching experience. One of our students—a mathematics major—told us that she feels this approach is like the highlighting of axioms, theorems and corollaries in mathematics books; it provides a foundation on which to build good software.

  • 73 Good Programming Practices
    Good Programming Practices are tips that call attention to techniques that will help students produce better programs. When we teach introductory courses to nonprogrammers, we state that the "buzzword" for each course is "clarity, " and we tell the students that we will highlight (in these Good Programming Practices) techniques for writing programs that are clearer, more understandable and more maintainable.
  • 125 Common Programming Errors
    Students learning a language—especially in their first programming course—tend to make certain kinds of errors frequently. Pointing out these Common Programming Errors reduces the likelihood that students will make the same mistakes. It also shortens long lines outside instructors' offices during office hours!
  • 31 Testing and Debugging Tips
    When we first designed this "tip type, " we thought the tips would contain suggestions strictly for exposing bugs and removing them from programs. In fact, many of the tips describe aspects of Python that prevent "bugs" from getting into programs in the first place, thus simplifying the testing and debugging process.
  • 35 Performance Tips
    In our experience, teaching students to write clear and understandable programs is by far the most important goal for a first programming course. But students also want to write programs that run the fastest, use the least memory, require the smallest number of keystrokes or dazzle in other ways. Students really care about performance and they want to know what they can do to produce the most efficient programs. We have included 35 Performance Tips that highlight opportunities for improving program performance—making programs run faster or minimizing the amount of memory that they occupy.
  • 23 Portability Tips
    We include Portability Tips to help students write portable code and to provide insights on how Python achieves its high degree of portability.
  • 92 Software Engineering Observations
    The object-oriented-programming paradigm necessitates a complete rethinking of the way ewe build software systems. Python is an effective language for achieving good software engineering. The Software Engineering Observations highlight architectural and design issues that affect the construction of software systems, especially large-scale systems. Much of what the student learns here will be useful in upper-level courses and in industry as the student begins to work with large, complex real-world systems.
  • 21 Look-and-Feel Observations
    We provide Look-and-Feel Observations to highlight graphical-user-interface conventions. These observations help students design attractive, user-friendly graphical user interfaces that conform to industry norms.

Summary (1462 Summary bullets)
Each chapter ends with additional pedagogical devices. We present a thorough, bullet-list-style summary of the chapter. On average, there are 43 summary bullets per chapter. This helps the students review and reinforce key concepts.

Terminology (2485 Terms)
We include an alphabetized list of the important terms defined in the chapter in a Terminology section. Again, this serves as further reinforcement. On average, there are 73 terms per chapter. Each term also appears in the index, so the student can locate terms and definitions quickly.

615 Self-Review Exercises and Answers (Count Includes Separate Parts)
Extensive self-review exercises and answers are included for self-study. These questions and answers give the student a chance to build confidence with the material and prepare for the regular exercises. Students should be encouraged to attempt all the self-review exercises and check their answers.

370 Exercises (Solutions in Instructor's Manual; Count Includes Separate Parts)
Each chapter concludes with a substantial set of exercises that involve simple recall of important terminology and concepts; writing individual Python statements; writing small portions of Python methods and classes; writing complete Python methods, classes and applications; and writing major projects. These exercises cover a wide variety of topics, enabling instructors to tailor their courses to the unique needs of their audiences and to vary course assignments each semester. Instructors can use the exercises to form homework assignments, short quizzes and major examinations. The solutions for the exercises are included in the Instructor's Manual and on the disks available only to instructors through their Prentice-Hall representatives. NOTE: Please do not write to us requesting the instructor's manual. Distribution of this publication is strictly limited to college professors teaching from the book. Instructors may obtain the solutions manual from their regular Prentice Hall representatives. We regret that we cannot provide the solutions to professionals. Solutions to approximately half the exercises are included on the Python Multimedia Cyber Classroom CD-ROM (available in April 2002 at www.InformIT.com/cyberclassrooms; also see the last few pages of this book or visit www.deitel.com for ordering instructions). Also available in April 2002 is the boxed product, The Complete Python Training Course, which includes both our textbook, Python How to Program and the Python Multimedia Cyber Classroom. All of our Complete Training Course products are available at bookstores and online booksellers, including www.InformIT.com.

Approximately 4212 Index Entries (with approximately 5733 Page References)
We have included an extensive Index at the back of the book. Using this resource, students can search for any term or concept by keyword. The Index is especially useful to practicing programmers who use the book as a reference. Each of the 2485 terms in the Terminology sections appears in the Index (along with many more index items from each chapter). Students can use the Index in conjunction with the Terminology sections to ensure that they have covered the key material in each chapter.

"Double Indexing" of All Python LIVE-CODE Examples
Python How to Program has 281 LIVE-CODE examples, which we have "double indexed." For every Python source-code program in the book, we took the file name with the .py extension, such as Book.py, and indexed it both alphabetically (in this case, under "B") and as a subindex item under "Examples." This makes it easier to find examples that are demonstrating particular features.

Software Included with Python How to Program

There are a number of Python products available for download from the Internet. We wrote Python How to Program using the Python Core Language 2.2 final release, and other software we have included on the CD-ROM that accompanies this text. This software includes the Apache Web Server 1.3.22, from the Apache Software Foundation and Alice99, a multimedia application for creating 2D and 3D graphics. The CD-ROM includes the wireless browser, Pixo 2.1, the IBM WebSphere Voice Server 1.5, a text-to-speech engine and Web-ware 0.6 for Python, which contains PSP software components for developing Web-based server-side applications. As we mentioned earlier, Python 2.2 was released almost to the minute that we released Python How to Program to Prentice Hall for publication. Some of the Python software packages you many want to use may not yet work with Python 2.2. If that is the case, please try running those software packages on Python 2.1, which you can download from www.python.org. If you still experience problems, please check the Python FAQs at www.deitel.com. The CD-ROM contains Windows and Linux versions of the software, where possible.

Ancillary Package for Python How to Program

Python How to Program has extensive ancillary materials for instructors teaching from the book. The Instructor's CD contains the Instructor's Manual with solutions to the vast majority of the end-of-chapter exercises and a Test Item File of multiple-choice questions (approximately two per book section). In addition, we provide PowerPoint® slides containing all the code and figures in the text. You are free to customize these slides to meet your own classroom needs. Prentice Hall provides a Companion Web Site (www.prenhall.com/deitel) that includes resources for instructors and students. For instructors, the Web site has a Syllabus Manager for course planning, links to the PowerPoint slides and reference materials from the appendices of the book (such as operator precedence chart, character set and Web resources). For students, the Web site provides chapter objectives, additional selfreview exercises and answers, chapter highlights and reference materials.

Python Multimedia Cyber Classroom and The Complete Python Training Course

We have prepared an interactive, multimedia, CD-ROM-based, software version of Python How to Program, called the Python Multimedia Cyber Classroom. This resource is loaded with e-learning features that are ideal for both education and reference. The Cyber Classroom is packaged with the textbook at a discount in The Complete Python Training Course. If you already have the book and would like to purchase the Python Multimedia Cyber Classroom separately, please visit www.InformIT.com/cyberclassrooms. The ISBN number for the CD-ROM format of the Python Multimedia Cyber Classroom is 0-13-067376-5 and the Web-based training format is ISBN number 0-13-067381-1. Many Deitel Cyber Classrooms are available in CD-ROM and Web-based formats.

The CD provides an introduction in which the authors overview the Cyber Classroom's features. The textbook's 281 LIVE-CODE example Python programs truly "come alive" in the Cyber Classroom. If you are viewing a program and want to execute it, you simply click the lightning-bolt icon, and the program will run. You immediately will see—and hear, when working with audio-based multimedia programs—the program's outputs. If you want to modify a program and see the effects of your changes, simply click the floppy-disk icon that causes the source code to be "lifted off' the CD and "dropped into" one of your own directories so you can edit the text, recompile the program and try out your new version. Click the audio icon, and one of the authors will discuss the program and "walk you through" the code.

The Cyber Classroom also provides navigational aids, including extensive hyperlinking. The Cyber Classroom is browser based, so it remembers sections that you have visited recently and allows you to move forward or backward among these sections. The thousands of index entries are hyperlinked to their text occurrences. Furthermore, when you enter a term using the "find" feature, the Cyber Classroom will locate occurrences of that term throughout the text. The Table of Contents entries are "hot," so clicking a chapter name takes you immediately to that chapter.

Students like the fact that solutions to approximately half the exercises in the book are included with the Cyber Classroom. Studying and running these extra programs is a great way for students to enhance their learning experience.

Students and professional users of our Cyber Classrooms tell us that they like the interactivity and that the Cyber Classroom is an effective reference due to its extensive hyperlinking and other navigational features. We received an email from a person who said that he lives "in the boonies" and cannot take a live course at a university, so the Cyber Classroom provided an ideal solution to his educational needs.

Professors tell us that their students enjoy using the Cyber Classroom and spend more time on the courses and master more of the material than in textbook-only courses. For a complete list of the available and forthcoming Cyber Classrooms and Complete Training Courses, see the Deitel Series page at the beginning of this book, the product listing and ordering information at the end of this book or visit www.deitel.com, www.prenhall.com/deitel and www.InformIT.com/deitel.

Deitel e-Learning Initiatives

e-Books and Support for Wireless Devices
Wireless devices will play an enormous role in the future of the Internet. Given recent bandwidth enhancements and the emergence of 2.5 and 3G technologies, it is projected that, within two years, more people will access the Internet through wireless devices than through desktop computers. Deitel & Associates, Inc., is committed to wireless accessibility and has recently published Wireless Internet & Mobile Business How to Program. To fulfill the needs of a wide range of customers, we are developing our content both in traditional print formats and in newly developed electronic formats, such as e-books so that students and professors can access content virtually anytime, anywhere. Visit www.deitel.com for periodic updates on these initiatives.

e-Matter
Deitel & Associates, Inc., is partnering with Prentice Hall's parent company, Pearson PLC, and its information technology Web site, www.InformIT.com, to launch the Deitel e-Matter series at www.InformIT.com/deitel. This series will provide professors, students and professionals with an additional source of information on specific programming topics. e-Matter consists of stand-alone sections taken from published texts, forthcoming texts or pieces written during the Deitel research-and-development process. Developing e-Matter based on pre-publication books allows us to offer significant amounts of the material to early adopters for use in courses. Some possible Python e-Matter titles we are considering include Object-Oriented Programming in Python; Graphical User Interface Programming in Python and Multithreading in Python.

Course Management Systems: WebCT, Blackboard, and CourseCompass
We are working with Prentice Hall to integrate our How to Program Series courseware into three Course Management Systems: WebCT, Blackboard and CourseCompass. These Course Management Systems enable instructors to create, manage and use sophisticated Webbased educational programs. Course Management System features include course customization (such as posting contact information, policies, syllabi, announcements, assignments, grades, performance evaluations and progress tracking), class and student management tools, a gradebook, reporting tools, communication tools (such as chat rooms), a whiteboard, document sharing, bulletin boards and more. Instructors can use these products to communicate with their students, create online quizzes and tests from questions directly linked to the text and automatically grade and track test results. For more information about these upcoming products, visit www.deitel.com/whatsnew.html. For demonstrations of existing WebCT, Blackboard and CourseCompass courses, visit cms.prenhall.com/webct/index.html, cms.prenhall.com/blackboard/index.html and cms.prenhall.com/coursecompass/index.html, respectively.

Deitel and InformIT Newsletters

Deitel Column in the InformIT Newsletters
Deitel & Associates, Inc., contributes a weekly column to the popular InformIT newsletter, currently subscribed to by more than 800,000 IT professionals worldwide. For opt-in registration, visit www.InformIT.com.

Deitel Newsletter
Our own free, opt-in newsletter includes commentary on industry trends and developments, links to articles and resources from our published books and upcoming publications, information on future publications, product-release schedules, programming tips, errata, additional insights and more. For opt-in registration, visit www.deitel.com.

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020