OReilly Programming Python 2nd (2001).pdf

(7151 KB) Pobierz
Microsoft Word - Programming Python.doc
Programming Python, 2nd Edition, O’Reilly
Programming Python, 2nd Edition
Mark Lutz
Publisher: O'Reilly
2nd Edition March 2001
ISBN: 0-596-00085-5, 1256 pages
Programming Python focuses on advanced applications of
Python. Endorsed by Python creator Guido van Rossum, it
demonstrates advanced Python techniques, and addresses
software design issues such as reusability and object-
oriented programming. The enclosed platform-neutral CD-
ROM (view CD-ROM content online at
http://examples.oreilly.com/python2 ) has book examples
and various Python-related packages, including the full
Python Version 2.0 source code distribution.
IT-SC book
1
Programming Python, 2nd Edition, O’Reilly
Enjoy the life together.
IT-SC book
2
Programming Python, 2nd Edition, O’Reilly
Foreword
Preface
"And Now for Something Completely Different . . . Again"
Signs of the Python Times
Why This Edition?
Major Changes in This Edition
Using the Examples and Demos
Conventions Used in This Book
Where to Look for Updates
Contacting O'Reilly
Acknowledgments
1. Introducing Python
1.1 "And Now for Something Completely Different"
1.2 The Life of Python
1.3 The Compulsory Features List
1.4 What's Python Good For?
1.5 What's Python Not Good For?
I: System Interfaces
2. System Tools
2.1 "The os.path to Knowledge"
2.2 Why Python Here?
2.3 System Scripting Overview
2.4 The sys Module
2.5 The os Module
2.6 Script Execution Context
2.7 Current Working Directory
2.8 Command-Line Arguments
2.9 Shell Environment Variables
2.10 Standard Streams
2.11 File Tools
2.12 Directory Tools
3. Parallel System Tools
3.1 "Telling the Monkeys What to Do"
3.2 Forking Processes
3.3 Threads
3.4 Program Exits
3.5 Interprocess Communication
3.6 Pipes
3.7 Signals
3.8 Launching Programs on Windows
3.9 Other System Tools
4. Larger System Examples I
4.1 "Splits and Joins and Alien Invasions"
4.2 Splitting and Joining Files
4.3 Generating Forward-Link Web Pages
4.4 A Regression Test Script
4.5 Packing and Unpacking Files
IT-SC book
3
Programming Python, 2nd Edition, O’Reilly
4.6 User-Friendly Program Launchers
5. Larger System Examples II
5.1 "The Greps of Wrath"
5.2 Fixing DOS Line Ends
5.3 Fixing DOS Filenames
5.4 Searching Directory Trees
5.5 Visitor: Walking Trees Generically
5.6 Copying Directory Trees
5.7 Deleting Directory Trees
5.8 Comparing Directory Trees
II: GUI Programming
6. Graphical User Interfaces
6.1 "Here's Looking at You, Kid"
6.2 Python GUI Development Options
6.3 Tkinter Overview
6.4 Climbing the GUI Learning Curve
6.5 The End of the Tutorial
6.6 Python/Tkinter for Tcl/Tk Converts
7. A Tkinter Tour, Part 1
7.1 "Widgets and Gadgets and GUIs, Oh My!"
7.2 Configuring Widget Appearance
7.3 Toplevel Windows
7.4 Dialogs
7.5 Binding Events
7.6 Message and Entry
7.7 Checkbutton, Radiobutton, and Scale
7.8 Running GUI Code Three Ways
7.9 Images
8. A Tkinter Tour, Part 2
8.1 "On Today's Menu: Spam, Spam, and Spam"
8.2 Menus
8.3 Listboxes and Scrollbars
8.4 Text
8.5 Canvas
8.6 Grids
8.7 Time Tools, Threads, and Animation
8.8 The End of the Tour
8.9 The PyDemos and PyGadgets Launchers
9. Larger GUI Examples
9.1 "Building a Better Mouse Trap"
9.2 Advanced GUI Coding Techniques
9.3 Complete Program Examples
9.4 PyEdit: A Text Editor Program/Object
9.5 PyView: An Image and Notes Slideshow
9.6 PyDraw: Painting and Moving Graphics
9.7 PyClock: An Analog/Digital Clock Widget
9.8 PyToe: A Tic-Tac-Toe Game Widget
IT-SC book
4
Programming Python, 2nd Edition, O’Reilly
9.9 Where to Go from Here
III: Internet Scripting
10. Network Scripting
10.1 "Tune in, Log on, and Drop out"
10.2 Plumbing the Internet
10.3 Socket Programming
10.4 Handling Multiple Clients
10.5 A Simple Python File Server
11. Client-Side Scripting
11.1 "Socket to Me!"
11.2 Transferring Files over the Net
11.3 Processing Internet Email
11.4 The PyMailGui Email Client
11.5 Other Client-Side Tools
12. Server-Side Scripting
12.1 "Oh What a Tangled Web We Weave"
12.2 What's a Server-Side CGI Script?
12.3 Climbing the CGI Learning Curve
12.4 The Hello World Selector
12.5 Coding for Maintainability
12.6 More on HTML and URL Escapes
12.7 Sending Files to Clients and Servers
13. Larger Web Site Examples I
13.1 "Things to Do When Visiting Chicago"
13.2 The PyMailCgi Web Site
13.3 The Root Page
13.4 Sending Mail by SMTP
13.5 Reading POP Email
13.6 Utility Modules
13.7 CGI Script Trade-offs
14. Larger Web Site Examples II
14.1 "Typos Happen"
14.2 The PyErrata Web Site
14.3 The Root Page
14.4 Browsing PyErrata Reports
14.5 Submitting PyErrata Reports
14.6 PyErrata Database Interfaces
14.7 Administrative Tools
14.8 Designing for Reuse and Growth
15. Advanced Internet Topics
15.1 "Surfing on the Shoulders of Giants"
15.2 Zope: A Web Publishing Framework
15.3 HTMLgen: Web Pages from Objects
15.4 JPython ( Jython): Python for Java
15.5 Grail: A Python-Based Web Browser
15.6 Python Restricted Execution Mode
IT-SC book
5
Zgłoś jeśli naruszono regulamin