| |
| |
Preface | |
| |
| |
Acknowledgments | |
| |
| |
About the Author | |
| |
| |
| |
General Application Topics | |
| |
| |
| |
Regular Expressions | |
| |
| |
| |
Introduction/Motivation | |
| |
| |
| |
Special Symbols and Characters | |
| |
| |
| |
Regexes and Python | |
| |
| |
| |
Some Regex Examples | |
| |
| |
| |
A Longer Regex Example | |
| |
| |
| |
Exercises | |
| |
| |
| |
Network Programming | |
| |
| |
| |
Introduction | |
| |
| |
| |
What Is Client/Server Architecture? | |
| |
| |
| |
Sockets: Communication Endpoints | |
| |
| |
| |
Network Programming in Python | |
| |
| |
| |
The SocketServer Module | |
| |
| |
| |
Introduction to the Twisted Framework | |
| |
| |
| |
Related Modules | |
| |
| |
| |
Exercises | |
| |
| |
| |
Internet Client Programming | |
| |
| |
| |
What are Internet Clients? | |
| |
| |
| |
Transferring Files | |
| |
| |
| |
Network News | |
| |
| |
| |
E-Mail | |
| |
| |
| |
Related Modules | |
| |
| |
| |
Exercises | |
| |
| |
| |
Multithreaded Programming | |
| |
| |
| |
Introduction/Motivation | |
| |
| |
| |
Threads and Processes | |
| |
| |
| |
Threads and Python | |
| |
| |
| |
The thread Module | |
| |
| |
| |
The threading Module | |
| |
| |
| |
Comparing Single vs. Multithreaded Execution | |
| |
| |
| |
Multithrading in Practice | |
| |
| |
| |
Producer-Consumr Problem and the Queue/queue Module | |
| |
| |
| |
Alternative Considerations to Threads | |
| |
| |
| |
Related Modules | |
| |
| |
| |
Exercises | |
| |
| |
| |
GUI Programming | |
| |
| |
| |
Introduction | |
| |
| |
| |
Tkinter and Python Programming | |
| |
| |
| |
Tkinter Examples | |
| |
| |
| |
A Brief Tour of Other GUIs | |
| |
| |
| |
Related Modules and Other GUIs | |
| |
| |
| |
Exercises | |
| |
| |
| |
Database Programming | |
| |
| |
| |
Introduction | |
| |
| |
| |
The Python DB-API | |
| |
| |
| |
ORMs | |
| |
| |
| |
Non-Relational Databases | |
| |
| |
| |
Related References | |
| |
| |
| |
Exercises | |
| |
| |
| |
Programming Microsoft Office | |
| |
| |
| |
Introduction | |
| |
| |
| |
COM Client Programming with Python | |
| |
| |
| |
Introductory Examples | |
| |
| |
| |
Intermediate Examples | |
| |
| |
| |
Related Modules/Packages | |
| |
| |
| |
Exercises | |
| |
| |
| |
Extending Python | |
| |
| |
| |
Introduction/Motivation | |
| |
| |
| |
Extending Python by Writing Extensions | |
| |
| |
| |
Related Topics | |
| |
| |
| |
Exercises | |
| |
| |
| |
Web Development | |
| |
| |
| |
Web Clients and Servers | |
| |
| |
| |
Iintroduction | |
| |
| |
| |
Python Web Client Tools | |
| |
| |
| |
Web Clients | |
| |
| |
| |
Web (HTTP) Servers | |
| |
| |
| |
Related Modules | |
| |
| |
| |
Exercises | |
| |
| |
| |
Web Programming: CGI and WSGI | |
| |
| |
| |
Introduction | |
| |
| |
| |
Helping Web Servers Process Client Data | |
| |
| |
| |
Building CGI Applications | |
| |
| |
| |
Using Unicode with CGI | |
| |
| |
| |
Advanced CGI | |
| |
| |
| |
Introduction to WSGI | |
| |
| |
| |
Real-World Web Development | |
| |
| |
| |
Related Modules | |
| |
| |
| |
Exercises | |
| |
| |
| |
Web Frameworks: Django | |
| |
| |
| |
Introduction | |
| |
| |
| |
Web Frameworks | |
| |
| |
| |
Introduction to Django | |
| |
| |
| |
Projects and Apps | |
| |
| |
| |
Your "Hello World" Application (A Blog) | |
| |
| |
| |
Creating a Model to Add Database Service | |
| |
| |
| |
The Python Application Shell | |
| |
| |
| |
The Django Administration App | |
| |
| |
| |
Creating the Blog's User Interface | |
| |
| |
| |
Improving the Output | |
| |
| |
| |
Working with User Input | |
| |
| |
| |
Forms and Model Forms | |
| |
| |
| |
More About Views | |
| |
| |
| |
Look-and-Feel Improvements | |
| |
| |
| |
Unit Testing | |
| |
| |
| |
An Intermediate Django App: The TweetApprover | |
| |
| |
| |
Resources | |
| |
| |
| |
Conclusion | |
| |
| |
| |
Exercises | |
| |
| |
| |
Cloud Computing: Google App Engine | |
| |
| |
| |
Introduction | |
| |
| |
| |
What is Cloud Computing? | |
| |
| |
| |
The Sandbox and the App Engine SDK | |
| |
| |
| |
Choosing an App Engine Framework | |
| |
| |
| |
Python 2.7 Support | |
| |
| |
| |
Comparisons to Django | |
| |
| |
| |
Morphing "Hello World" into a Simple Blog | |
| |
| |
| |
Adding Memcache Service | |
| |
| |
| |
Static Files | |
| |
| |
| |
Adding Users Service | |
| |
| |
| |
Remote API Shell | |
| |
| |
| |
Lightning Round (with Python Code) | |
| |
| |
| |
Sending Instant Messages by Using XMPP | |
| |
| |
| |
Processing Images | |
| |
| |
| |
Task Queues (Unscheduled Tasks) | |
| |
| |
| |
Profiling with Appstats | |
| |
| |
| |
The URLfetch Service | |
| |
| |
| |
Lightning Round (without Python Code) | |
| |
| |
| |
Vendor Lock-In | |
| |
| |
| |
Resources | |
| |
| |
| |
Conclusion | |
| |
| |
| |
Exercises | |
| |
| |
| |
Web Services | |
| |
| |
| |
Introduction | |
| |
| |
| |
The Yahoo! Finance Stock Quote Server | |
| |
| |
| |
Microblogging with Twitter | |
| |
| |
| |
Exercises | |
| |
| |
| |
Supplemental/Experimental | |
| |
| |
| |
Text Processing | |
| |
| |
| |
Comma-Separated Values | |
| |
| |
| |
JavaScript Object Notation | |
| |
| |
| |
Extensible Markup Language | |
| |
| |
| |
References | |
| |
| |
| |
Related Modules | |
| |
| |
| |
Exercises | |
| |
| |
| |
Miscellaneous | |
| |
| |
| |
Jython | |
| |
| |
| |
Google+ | |
| |
| |
| |
Exercises | |
| |
| |
| |
Answers to Selected Exercises | |
| |
| |
| |
Reference Tables | |
| |
| |
| |
Python 3: The Evolution of a Programming Language | |
| |
| |
| |
Why is Python Changing? | |
| |
| |
| |
What has Changed? | |
| |
| |
| |
Migration Tools | |
| |
| |
| |
Conclusion | |
| |
| |
| |
References | |
| |
| |
| |
Python 3 Migration with 2.6+ | |
| |
| |
| |
Python 3: The Next Generation | |
| |
| |
| |
Integers | |
| |
| |
| |
Built-in Functions | |
| |
| |
| |
Object-Oriented Programming: Two Different Class Objects | |
| |
| |
| |
Strings | |
| |
| |
| |
Exceptions | |
| |
| |
| |
Other Transition Tools and Tips | |
| |
| |
| |
Writing Code that is Compatible in Both Versions 2.x and 3.x | |
| |
| |
| |
Conclusion | |
| |
| |
Index | |