Book description
Beginning Python: Using Python 2.6 and Python 3.1 introduces this open source, portable, interpreted, object-oriented programming language that combines remarkable power with clear syntax. This book enables you to quickly create robust, reliable, and reusable Python applications by teaching the basics so you can quickly develop Web and scientific applications, incorporate databases, and master systems tasks on various operating systems, including Linux, MAC OS, and Windows. You'll get a comprehensive tutorial that guides you from writing simple, basic Python scripts all the way through complex concepts, and also features a reference of the standard modules with examples illustrating how to implement features in the various modules. Plus, the book covers using Python in specific program development domains, such as XML, databases, scientific applications, network programming, and Web development.
Table of contents
- Copyright
- About the Author
- Credits
- Acknowledgments
- Introduction
-
I. Dipping Your Toe into Python
- 1. Programming Basics and Strings
- 2. Numbers and Operators
- 3. Variables — Names for Values
-
II. Python Language and the Standard Library
- 4. Making Decisions
-
5. Functions
- 5.1. Putting Your Program into Its Own File
-
5.2. Functions: Grouping Code under a Name
- 5.2.1. Choosing a Name
- 5.2.2. Describing a Function in the Function
- 5.2.3. The Same Name in Two Different Places
- 5.2.4. Making Notes to Yourself
- 5.2.5. Asking a Function to Use a Value You Provide
- 5.2.6. Checking Your Parameters
- 5.2.7. Setting a Default Value for a Parameter — Just in Case
- 5.2.8. Calling Functions from within Other Functions
- 5.2.9. Functions Inside of Functions
- 5.2.10. Flagging an Error on Your Own Terms
- 5.3. Layers of Functions
- 5.4. Summary
- 5.5. Exercises
- 6. Classes and Objects
- 7. Organizing Programs
- 8. Files and Directories
- 9. Other Features of the Language
- 10. Building a Module
- 11. Text Processing
-
III. Putting Python to Work
- 12. Testing
- 13. Writing a GUI with Python
- 14. Accessing Databases
-
15. Using Python for XML
- 15.1. What Is XML?
- 15.2. What Is a Schema/DTD?
- 15.3. Document Type Definitions
- 15.4. Schemas
- 15.5. XPath
- 15.6. HTML as a Subset of XML
- 15.7. XML Libraries Available for Python
- 15.8. What Is SAX?
- 15.9. Why Use SAX or DOM
- 15.10. SAX and DOM Parsers Available for Python
- 15.11. Intro to XSLT
- 15.12. What Is lxml?
- 15.13. Element Classes
- 15.14. Parsing with lxml
- 15.15. Summary
- 15.16. Exercises
-
16. Network Programming
- 16.1. Understanding Protocols
- 16.2. Sending Internet E-mail
- 16.3. Retrieving Internet E-mail
-
16.4. Socket Programming
- 16.4.1. Introduction to Sockets
- 16.4.2. Binding to an External Hostname
- 16.4.3. The Mirror Server
- 16.4.4. The Mirror Client
- 16.4.5. SocketServer
- 16.4.6. Multithreaded Servers
- 16.4.7. The Python Chat Server
- 16.4.8. Design of the Python Chat Server
- 16.4.9. The Python Chat Server Protocol
- 16.4.10. The Python Chat Client
- 16.4.11. Single-Threaded Multitasking with select
- 16.5. Other Topics
- 16.6. Summary
- 16.7. Exercises
- 17. Extension Programming with C
- 18. Numerical Programming
-
19. An Introduction to Django
- 19.1. What Are Frameworks and Why Would I Use One?
- 19.2. Other Features of Web Frameworks
- 19.3. Django — How It All Began
- 19.4. Understanding Django's Architecture
- 19.5. Working with Templates
- 19.6. Using Templates and Views
- 19.7. Creating a Model: Creating an Application
- 19.8. Summary
- 19.9. Exercises
-
20. Web Applications and Web Services
- 20.1. REST: The Architecture of the Web
- 20.2. HTTP: Real-World REST
- 20.3. CGI: Turning Scripts into Web Applications
- 20.4. HTML Forms' Limited Vocabulary
- 20.5. Safety When Accessing Form Values
- 20.6. Building a Wiki
- 20.7. Web Services
- 20.8. REST Web Services
- 20.9. XML-RPC
- 20.10. SOAP
- 20.11. Documenting Your Web Service API
- 20.12. Choosing a Web Service Standard
- 20.13. Web Service Etiquette
- 20.14. Summary
- 20.15. Exercises
-
21. Integrating Java with Python
- 21.1. Scripting within Java Applications
- 21.2. Comparing Python Implementations
- 21.3. Installing Jython
- 21.4. Running Jython
- 21.5. Running Jython on Your Own
- 21.6. Packaging Jython-Based Applications
- 21.7. Integrating Java and Jython
- 21.8. Testing from Jython
- 21.9. Embedding the Jython Interpreter
- 21.10. Handling Differences between C-Python and Jython
- 21.11. Summary
- 21.12. Exercises
-
IV. Appendices
-
A. Answers to the Exercises
- A.1. Chapter 1
- A.2. Chapter 2
- A.3. Chapter 3
- A.4. Chapter 4
- A.5. Chapter 5
- A.6. Chapter 6
- A.7. Chapter 7
- A.8. Chapter 8
- A.9. Chapter 9
- A.10. Chapter 10
- A.11. Chapter 11
- A.12. Chapter 13
- A.13. Chapter 14
- A.14. Chapter 15
- A.15. Chapter 16
- A.16. Chapter 17
- A.17. Chapter 18
- A.18. Chapter 19
- A.19. Chapter 20
- A.20. Chapter 21
- B. Online Resources
- C. What's New in Python 3.1
- D. Glossary
-
A. Answers to the Exercises
Product information
- Title: Beginning Python®: Using Python 2.6 and Python 3.1
- Author(s):
- Release date: February 2010
- Publisher(s): Wrox
- ISBN: 9780470414637
You might also like
book
Python: Journey from Novice to Expert
Learn core concepts of Python and unleash its power to script highest quality Python programs About …
book
Getting Started with Python
Harness the power of Python objects and data structures to implement algorithms for analyzing your data …
book
Core Python Applications Programming, 3rd Edition
Already know Python but want to learn more? A lot more? Dive into a variety of …
book
Learning Python Networking - Second Edition
Achieve improved network programmability and automation by leveraging powerful network programming concepts, algorithms, and tools Key …