Differences between revisions 2 and 23 (spanning 21 versions)
Revision 2 as of 2004-08-10 22:07:43
Size: 23437
Editor: Zoom.Quiet
Comment:
Revision 23 as of 2004-09-21 23:21:53
Size: 23622
Editor: 61
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
有效而实用的 CookBook 浅显明了,但是还是母语使用的更爽一些! 此处格式化的很多章节都是从 中国Linux论坛 Limodou 管理的"Python 编 程"板块中得来!向先行者表示感謝!

有效而实用的 pythonCookBook 浅显明了,但是还是母语使用的更爽一些!
Line 7: Line 9:
[http://www.linuxforum.net/forum/showflat.php?Cat=&Board=python&Number=495931&page=0&view=collapsed&sb=5&o=31&fpart= 精华]@Python CookBook(Python食谱)

欢迎志愿人员参加翻译,审核! 建议使用模板 PyCookbookTemplet
[http://www.linuxforum.net/forum/showflat.php?Cat=&Board=python&Number=495931&page=0&view=collapsed&sb=5&o=31&fpart= 精华-Python CookBook](Python食谱)

 * 欢迎志愿人员参加翻译,审核!
 *
建议使用模板 zhPyCookbookTemplate
Line 63: Line 67:
 * " ["PyCkBk-2-10"] "Section 2.10. Performing Frequent Membership Tests on a Sequence
 * " ["PyCkBk-2-11"] "Section 2.11. Finding the Deep Index of an Item in an Embedded Sequence
 * " ["PyCkBk-2-12"] "Section 2.12. Showing Off Quicksort in Three Lines
 * " ["PyCkBk-2-13"] "Section 2.13. Sorting Objects Using SQL's ORDER BY Syntax
 * " ["PyCkBk-2-10"] "Python 食谱--2.10:在一个序列上执行频繁的成员关系测试
 * " ["PyCkBk-2-11"] "Python 食谱--2.11:在一个嵌入的序列中发现一个条目的深度索引
 * " ["PyCkBk-2-12"] "Python 食谱--2.12:在三行代码中展示Quicksort
 * " ["PyCkBk-2-13"] "Python 食谱--2.13:使用sql的 ORDER BY 语法来为对象排序
Line 70: Line 74:
 * " ["PyCkBk-3-2"] "Section 3.2. Processing a String One Character at a Time
 * " ["PyCkBk-3-3"] "Section 3.3. Testing if an Object Is String-Like
 * " ["PyCkBk-3-4"] "Section 3.4. Aligning Strings
 * " ["PyCkBk-3-5"] "Section 3.5. Trimming Space from the Ends of a String
 * " ["PyCkBk-3-6"] "Section 3.6. Combining Strings
 * " ["PyCkBk-3-7"] "Section 3.7. Checking Whether a String Contains a Set of Characters
 * " ["PyCkBk-3-8"] "Section 3.8. Filtering a String for a Set of Characters
 * " ["PyCkBk-3-9"] "Section 3.9. Controlling Case
 * " ["PyCkBk-3-10"] "Section 3.10. Reversing a String by Words or Characters
 * " ["PyCkBk-3-11"] "Section 3.11. Accessing Substrings
 * " ["PyCkBk-3-12"] "Section 3.12. Changing the Indentation of a Multiline String
 * " ["PyCkBk-3-13"] "Section 3.13. Testing Whether a String Represents an Integer
 * " ["PyCkBk-3-14"] "Section 3.14. Expanding and Compressing Tabs
 * " ["PyCkBk-3-2"] "Python 食谱--3.2:每次处理字符串的一个字符
 * " ["PyCkBk-3-3"] "Python 食谱--3.3:测试是否一个对象是类似的string
 * " ["PyCkBk-3-4"] "Python 食谱--3.4:排列字符串
 * " ["PyCkBk-3-5"] "Python 食谱--3.5:从一个string的尾部清除空格
 * " ["PyCkBk-3-6"] "Python 食谱--3.6:合并字符串
 * " ["PyCkBk-3-7"] "Python 食谱--3.7:检查是否一个字符串中包合某个集合中的字符
 * " ["PyCkBk-3-8"] "Python 食谱--3.8:用一个字符集过滤一个字符串
 * " ["PyCkBk-3-9"] "Python 食谱--3.9:操纵大小写
 * " ["PyCkBk-3-10"] "Python 食谱--3.10:在字符串中倒转字符或单词(的顺序)
 * " ["PyCkBk-3-11"] "Python 食谱--3.11:访问子串
 * " ["PyCkBk-3-12"] "Python 食谱--3.12:改变多行字符串的缩进
 * " ["PyCkBk-3-13"] "Python 食谱--3.13:检测一个字符串是否表达一个整数
 * " ["PyCkBk-3-14"] "Python 食谱--3.14:扩展以及压缩制表符(Tab)
Line 96: Line 100:
 * " ["PyCkBk-4-2"] "Section 4.2. Reading from a File
 * " ["PyCkBk-4-3"] "Section 4.3. Writing to a File
 * " ["PyCkBk-4-4"] "Section 4.4. Searching and Replacing Text in a File
 * " ["PyCkBk-4-5"] "Section 4.5. Reading a Particular Line from a File
 * " ["PyCkBk-4-6"] "Section 4.6. Retrieving a Line at Random from a File of Unknown Size
 * " ["PyCkBk-4-7"] "Section 4.7. Counting Lines in a File
 * " ["PyCkBk-4-8"] "Section 4.8. Processing Every Word in a File
 * " ["PyCkBk-4-2"] "Python 食谱--4.2 : 读文件
 * " ["PyCkBk-4-3"] "Python 食谱--4.3 : 写文件
 * " ["PyCkBk-4-4"] "Python 食谱--4.4 : 查找替换文件中字符串
 * " ["PyCkBk-4-5"] "Python 食谱--4.5 : 读取文件特定行
 * " ["PyCkBk-4-6"] "Python 食谱--4.6 : 读取文件随机行
 * " ["PyCkBk-4-7"] "Python 食谱--4.7 : 统计文件行数
 * " ["PyCkBk-4-8"] "Python 食谱--4.8 : 处理文件每个单词

中国Linux论坛>>Python 编 程 中 rings 自发开始的翻译工作!

此处格式化的很多章节都是从 中国Linux论坛 Limodou 管理的"Python 编 程"板块中得来!向先行者表示感謝!

有效而实用的 pythonCookBook 浅显明了,但是还是母语使用的更爽一些! [http://www.linuxforum.net/forum/showflat.php?Cat=&Board=python&Number=495931&page=0&view=collapsed&sb=5&o=31&fpart= 精华-Python CookBook](Python食谱)

  • 欢迎志愿人员参加翻译,审核!
  • 建议使用模板 zhPyCookbookTemplate

TableOfContents

Python Cookbook

04/22/04 22:19 开始! By Alex Martelli, David Ascher

  • Publisher : O'Reilly
  • Pub Date : July 2002
  • ISBN : 0-596-00167-3
  • Pages : 606

序 Preface

        The Design of the Book 
        The Implementation of the Book 
        A Note About Licenses 
        Audience 
        Organization 
        Further Reading 
        Conventions Used in This Book 
        How to Contact Us 
        Acknowledgments 

Chapter 1. 短平快 Python Shortcuts

  • " ["PyCkBk-1-1"] "Section 1.1. Introduction

  • " ["PyCkBk-1-2"] "Python 食谱--1.2: 不使用临时变量来交换值

  • " ["PyCkBk-1-3"] "Python 食谱--1.3: 不用过多的引用来构造一个字典

  • " ["PyCkBk-1-4"] "Python 食谱--1.4:从字典中获取一个值

  • " ["PyCkBk-1-5"] "Python 食谱--1.5:增加一个入口到字典里

  • " ["PyCkBk-1-6"] "Python 食谱--1.6:在字典里把每一个键同多个值关联起来

  • " ["PyCkBk-1-7"] "Python 食谱--1.7:使用字典来分发

  • " ["PyCkBk-1-8"] "Python 食谱--1.8:集中一组命名的条目

  • " ["PyCkBk-1-9"] "Python 食谱--1.9:发现两个字典的交集

  • " ["PyCkBk-1-10"] "Python 食谱--1.10:用一个语句来赋值和测试

  • " ["PyCkBk-1-11"] "Python 食谱--1.11:使用list包容代替map和filter

  • " ["PyCkBk-1-12"] "Python 食谱--1.12:解包简单的类list对象

  • " ["PyCkBk-1-13"] "Python 食谱--1.13:拉平一个嵌套的序列

  • " ["PyCkBk-1-14"] "Python 食谱--1.14:在索引和序列元素上并行循环

  • " ["PyCkBk-1-15"] "Python 食谱--1.15:通过多个list循环

  • " ["PyCkBk-1-16"] "Python 食谱--1.16:生成一个浮点数定义的range

  • " ["PyCkBk-1-17"] "Python 食谱--1.17:变换二维数组

  • " ["PyCkBk-1-18"] "Python 食谱--1.18:不用共享引用建立列表的列表

Chapter 2. 搜索和排序 Searching and Sorting

  • " ["PyCkBk-2-1"] "Section 2.1. Introduction

  • " ["PyCkBk-2-2"] "Python 食谱--2.2:给字典排序

  • " ["PyCkBk-2-3"] "Python 食谱--2.3:有效的处理选择的结构数据对

  • " ["PyCkBk-2-4"] "Python 食谱--2.4:在保持稳定性的同时来排序

  • " ["PyCkBk-2-5"] "Python 食谱--2.5:通过两个字段来排序

  • " ["PyCkBk-2-6"] "Python 食谱--2.6:在一个有序的序列里使用二分查找法来查找条目

  • " ["PyCkBk-2-7"] "Python 食谱--2.7:通过对象的属性来排序对象的列表

  • " ["PyCkBk-2-8"] "Python 食谱--2.8:通过元素或者属性来排序

  • " ["PyCkBk-2-9"] "Python 食谱--2.9:不用循环从一个list中选择随机的元素

  • " ["PyCkBk-2-10"] "Python 食谱--2.10:在一个序列上执行频繁的成员关系测试

  • " ["PyCkBk-2-11"] "Python 食谱--2.11:在一个嵌入的序列中发现一个条目的深度索引

  • " ["PyCkBk-2-12"] "Python 食谱--2.12:在三行代码中展示Quicksort

  • " ["PyCkBk-2-13"] "Python 食谱--2.13:使用sql的 ORDER BY 语法来为对象排序

Chapter 3. 文本 Text

  • " ["PyCkBk-3-1"] "Section 3.1. Introduction

  • " ["PyCkBk-3-2"] "Python 食谱--3.2:每次处理字符串的一个字符

  • " ["PyCkBk-3-3"] "Python 食谱--3.3:测试是否一个对象是类似的string

  • " ["PyCkBk-3-4"] "Python 食谱--3.4:排列字符串

  • " ["PyCkBk-3-5"] "Python 食谱--3.5:从一个string的尾部清除空格

  • " ["PyCkBk-3-6"] "Python 食谱--3.6:合并字符串

  • " ["PyCkBk-3-7"] "Python 食谱--3.7:检查是否一个字符串中包合某个集合中的字符

  • " ["PyCkBk-3-8"] "Python 食谱--3.8:用一个字符集过滤一个字符串

  • " ["PyCkBk-3-9"] "Python 食谱--3.9:操纵大小写

  • " ["PyCkBk-3-10"] "Python 食谱--3.10:在字符串中倒转字符或单词(的顺序)

  • " ["PyCkBk-3-11"] "Python 食谱--3.11:访问子串

  • " ["PyCkBk-3-12"] "Python 食谱--3.12:改变多行字符串的缩进

  • " ["PyCkBk-3-13"] "Python 食谱--3.13:检测一个字符串是否表达一个整数

  • " ["PyCkBk-3-14"] "Python 食谱--3.14:扩展以及压缩制表符(Tab)

  • " ["PyCkBk-3-15"] "Section 3.15. Replacing Multiple Patterns in a Single Pass

  • " ["PyCkBk-3-16"] "Section 3.16. Converting Between Different Naming Conventions

  • " ["PyCkBk-3-17"] "Section 3.17. Converting Between Characters and Values

  • " ["PyCkBk-3-18"] "Section 3.18. Converting Between Unicode and Plain Strings

  • " ["PyCkBk-3-19"] "Section 3.19. Printing Unicode Characters to Standard Output

  • " ["PyCkBk-3-10"] "Section 3.20. Dispatching Based on Pattern Matches

  • " ["PyCkBk-3-21"] "Section 3.21. Evaluating Code Inside Strings

  • " ["PyCkBk-3-22"] "Section 3.22. Replacing Python Code with the Results of Executing That Code

  • " ["PyCkBk-3-23"] "Section 3.23. Module: Yet Another Python Templating Utility (YAPTU)

  • " ["PyCkBk-3-14"] "Section 3.24. Module: Roman Numerals

Chapter 4. 文件 Files

  • " ["PyCkBk-4-1"] "Section 4.1. Introduction

  • " ["PyCkBk-4-2"] "Python 食谱--4.2 : 读文件

  • " ["PyCkBk-4-3"] "Python 食谱--4.3 : 写文件

  • " ["PyCkBk-4-4"] "Python 食谱--4.4 : 查找替换文件中字符串

  • " ["PyCkBk-4-5"] "Python 食谱--4.5 : 读取文件特定行

  • " ["PyCkBk-4-6"] "Python 食谱--4.6 : 读取文件随机行

  • " ["PyCkBk-4-7"] "Python 食谱--4.7 : 统计文件行数

  • " ["PyCkBk-4-8"] "Python 食谱--4.8 : 处理文件每个单词

  • " ["PyCkBk-4-9"] "Section 4.9. Reading a Text File by Paragraphs

  • " ["PyCkBk-4-10"] "Section 4.10. Reading Lines with Continuation Characters

  • " ["PyCkBk-4-11"] "Section 4.11. Reading Data from ZIP Files

  • " ["PyCkBk-4-12"] "Section 4.12. Reading INI Configuration Files

  • " ["PyCkBk-4-13"] "Section 4.13. Sending Binary Data to Standard Output Under Windows

  • " ["PyCkBk-4-14"] "Section 4.14. Using Random-Access Input/Output

  • " ["PyCkBk-4-15"] "Section 4.15. Updating a Random-Access File

  • " ["PyCkBk-4-16"] "Section 4.16. Splitting a Path into All of Its Parts

  • " ["PyCkBk-4-17"] "Section 4.17. Treating Pathnames as Objects

  • " ["PyCkBk-4-18"] "Section 4.18. Creating Directories Including Necessary Parent Directories

  • " ["PyCkBk-4-19"] "Section 4.19. Walking Directory Trees

  • " ["PyCkBk-4-20"] "Section 4.20. Swapping One File Extension for Another Throughout a Directory Tree

  • " ["PyCkBk-4-21"] "Section 4.21. Finding a File Given an Arbitrary Search Path

  • " ["PyCkBk-4-22"] "Section 4.22. Finding a File on the Python Search Path

  • " ["PyCkBk-4-23"] "Section 4.23. Dynamically Changing the Python Search Path

  • " ["PyCkBk-4-24"] "Section 4.24. Computing Directory Sizes in a Cross-Platform Way

  • " ["PyCkBk-4-25"] "Section 4.25. File Locking Using a Cross-Platform API

  • " ["PyCkBk-4-26"] "Section 4.26. Versioning Filenames

  • " ["PyCkBk-4-27"] "Section 4.27. Module: Versioned Backups

Chapter 5. 面向对象 Object-Oriented Programming

  • " ["PyCkBk-5-1"] "Section 5.1. Introduction

  • " ["PyCkBk-5-2"] "Section 5.2. Overriding a Built-In Method

  • " ["PyCkBk-5-3"] "Section 5.3. Getting All Members of a Class Hierarchy

  • " ["PyCkBk-5-4"] "Section 5.4. Calling a Superclass _ _init_ _ Method if It Exists

  • " ["PyCkBk-5-5"] "Section 5.5. Calling a Superclass Implementation of a Method

  • " ["PyCkBk-5-6"] "Section 5.6. Implementing Properties

  • " ["PyCkBk-5-7"] "Section 5.7. Implementing Static Methods

  • " ["PyCkBk-5-8"] "Section 5.8. Implementing Class Methods

  • " ["PyCkBk-5-9"] "Section 5.9. Delegating Automatically as an Alternative to Inheritance

  • " ["PyCkBk-5-10"] "Section 5.10. Decorating an Object with Print-Like Methods

  • " ["PyCkBk-5-11"] "Section 5.11. Checking if an Object Has Necessary Attributes

  • " ["PyCkBk-5-12"] "Section 5.12. Making a Fast Copy of an Object

  • " ["PyCkBk-5-13"] "Section 5.13. Adding Methods to a Class at Runtime

  • " ["PyCkBk-5-14"] "Section 5.14. Modifying the Class Hierarchy of an Instance

  • " ["PyCkBk-5-15"] "Section 5.15. Keeping References to Bound Methods Without Inhibiting Garbage Collection

  • " ["PyCkBk-5-16"] "Section 5.16. Defining Constants

  • " ["PyCkBk-5-17"] "Section 5.17. Managing Options

  • " ["PyCkBk-5-18"] "Section 5.18. Implementing a Set Class

  • " ["PyCkBk-5-19"] "Section 5.19. Implementing a Ring Buffer

  • " ["PyCkBk-5-20"] "Section 5.20. Implementing a Collection

  • " ["PyCkBk-5-21"] "Section 5.21. Delegating Messages to Multiple Objects

  • " ["PyCkBk-5-22"] "Section 5.22. Implementing the Singleton Design Pattern

  • " ["PyCkBk-5-23"] "Section 5.23. Avoiding the Singleton Design Pattern with the Borg Idiom

  • " ["PyCkBk-5-24"] "Section 5.24. Implementing the Null Object Design Pattern

Chapter 6. 线程,进程,同步 Threads, Processes, and Synchronization

  • " ["PyCkBk-6-1"] "Section 6.1. Introduction

  • " ["PyCkBk-6-2"] "Section 6.2. Storing Per-Thread Information

  • " ["PyCkBk-6-3"] "Section 6.3. Terminating a Thread

  • " ["PyCkBk-6-4"] "Section 6.4. Allowing Multithreaded Read Access While Maintaining a Write Lock

  • " ["PyCkBk-6-5"] "Section 6.5. Running Functions in the Future

  • " ["PyCkBk-6-6"] "Section 6.6. Synchronizing All Methods in an Object

  • " ["PyCkBk-6-7"] "Section 6.7. Capturing the Output and Error Streams from a Unix Shell Command

  • " ["PyCkBk-6-8"] "Section 6.8. Forking a Daemon Process on Unix

  • " ["PyCkBk-6-9"] "Section 6.9. Determining if Another Instance of a Script Is Already Running in Windows

  • " ["PyCkBk-6-10"] "Section 6.10. Processing Windows Messages Using MsgWaitForMultipleObjects

Chapter 7. 系统管理 System Administration

  • " ["PyCkBk-7-1"] "Section 7.1. Introduction

  • " ["PyCkBk-7-2"] "Section 7.2. Running a Command Repeatedly

  • " ["PyCkBk-7-3"] "Section 7.3. Generating Random Passwords

  • " ["PyCkBk-7-4"] "Section 7.4. Generating Non-Totally Random Passwords

  • " ["PyCkBk-7-5"] "Section 7.5. Checking the Status of a Unix Network Interface

  • " ["PyCkBk-7-6"] "Section 7.6. Calculating Apache Hits per IP Address

  • " ["PyCkBk-7-7"] "Section 7.7. Calculating the Rate of Client Cache Hits on Apache

  • " ["PyCkBk-7-9"] "Section 7.8. Manipulating the Environment on Windows NT/2000/XP

  • " ["PyCkBk-7-9"] "Section 7.9. Checking and Modifying the Set of Tasks Windows Automatically Runs at Logon

  • " ["PyCkBk-7-10"] "Section 7.10. Examining the Microsoft Windows Registry for a List of Name Server Addresses

  • " ["PyCkBk-7-11"] "Section 7.11. Getting Information About the Current User on Windows NT/2000

  • " ["PyCkBk-7-12"] "Section 7.12. Getting the Windows Service Name from Its Long Name

  • " ["PyCkBk-7-13"] "Section 7.13. Manipulating Windows Services

  • " ["PyCkBk-7-14"] "Section 7.14. Impersonating Principals on Windows

  • " ["PyCkBk-7-15"] "Section 7.15. Changing a Windows NT Password Using ADSI

  • " ["PyCkBk-7-16"] "Section 7.16. Working with Windows Scripting Host (WSH) from Python

  • " ["PyCkBk-7-17"] "Section 7.17. Displaying Decoded Hotkeys for Shortcuts in Windows

Chapter 8. 数据和持续性 Databases and Persistence

  • " ["PyCkBk-8-1"] "Section 8.1. Introduction

  • " ["PyCkBk-8-2"] "Section 8.2. Serializing Data Using the marshal Module

  • " ["PyCkBk-8-3"] "Section 8.3. Serializing Data Using the pickle and cPickle Modules

  • " ["PyCkBk-8-4"] "Section 8.4. Using the cPickle Module on Classes and Instances

  • " ["PyCkBk-8-5"] "Section 8.5. Mutating Objects with shelve

  • " ["PyCkBk-8-6"] "Section 8.6. Accesssing a MySQL Database

  • " ["PyCkBk-8-7"] "Section 8.7. Storing a BLOB in a MySQL Database

  • " ["PyCkBk-8-8"] "Section 8.8. Storing a BLOB in a PostgreSQL Database

  • " ["PyCkBk-8-9"] "Section 8.9. Generating a Dictionary Mapping from Field Names to Column Numbers

  • " ["PyCkBk-8-10"] "Section 8.10. Using dtuple for Flexible Access to Query Results

  • " ["PyCkBk-8-11"] "Section 8.11. Pretty-Printing the Contents of Database Cursors

  • " ["PyCkBk-8-12"] "Section 8.12. Establishing Database Connections Lazily

  • " ["PyCkBk-8-13"] "Section 8.13. Accessing a JDBC Database from a Jython Servlet

  • " ["PyCkBk-8-14"] "Section 8.14. Module: jet2sql桟reating a SQL DDL from an Access Database

Chapter 9. 用户界面 User Interfaces

  • " ["PyCkBk-9-1"] "Section 9.1. Introduction

  • " ["PyCkBk-9-2"] "Section 9.2. Avoiding lambda in Writing Callback Functions

  • " ["PyCkBk-9-3"] "Section 9.3. Creating Menus with Tkinter

  • " ["PyCkBk-9-4"] "Section 9.4. Creating Dialog Boxes with Tkinter

  • " ["PyCkBk-9-5"] "Section 9.5. Supporting Multiple Values per Row in a Tkinter Listbox

  • " ["PyCkBk-9-6"] "Section 9.6. Embedding Inline GIFs Using Tkinter

  • " ["PyCkBk-9-7"] "Section 9.7. Combining Tkinter and Asynchronous I/O with Threads

  • " ["PyCkBk-9-8"] "Section 9.8. Using a wxPython Notebook with Panels

  • " ["PyCkBk-9-9"] "Section 9.9. Giving the User Unobtrusive Feedback During Data Entry with Qt

  • " ["PyCkBk-9-10"] "Section 9.10. Building GUI Solutions Independent of the Specific GUI Toolkit

  • " ["PyCkBk-9-11"] "Section 9.11. Creating Color Scales

  • " ["PyCkBk-9-12"] "Section 9.12. Using Publish/Subscribe Broadcasting to Loosen the Coupling Between GUI and Business Logic Systems

  • " ["PyCkBk-9-13"] "Section 9.13. Module: Building GTK GUIs Interactively

Chapter 10. 网络 Network Programming

  • " ["PyCkBk-10-1"] "Section 10.1. Introduction

  • " ["PyCkBk-10-2"] "Section 10.2. Writing a TCP Client

  • " ["PyCkBk-10-3"] "Section 10.3. Writing a TCP Server

  • " ["PyCkBk-10-4"] "Section 10.4. Passing Messages with Socket Datagrams

  • " ["PyCkBk-10-5"] "Section 10.5. Finding Your Own Name and Address

  • " ["PyCkBk-10-6"] "Section 10.6. Converting IP Addresses

  • " ["PyCkBk-10-7"] "Section 10.7. Grabbing a Document from the Web

  • " ["PyCkBk-10-8"] "Section 10.8. Being an FTP Client

  • " ["PyCkBk-10-9"] "Section 10.9. Sending HTML Mail

  • " ["PyCkBk-10-10"] "Section 10.10. Sending Multipart MIME Email

  • " ["PyCkBk-10-11"] "Section 10.11. Bundling Files in a MIME Message

  • " ["PyCkBk-10-12"] "Section 10.12. Unpacking a Multipart MIME Message

  • " ["PyCkBk-10-13"] "Section 10.13. Module: PyHeartBeat桪etecting Inactive Computers

  • " ["PyCkBk-10-14"] "Section 10.14. Module: Interactive POP3 Mailbox Inspector

  • " ["PyCkBk-10-15"] "Section 10.15. Module: Watching for New IMAP Mail Using a GUI

Chapter 11. 互联网 Web Programming

  • " ["PyCkBk-11-1"] "Section 11.1. Introduction

  • " ["PyCkBk-11-2"] "Section 11.2. Testing Whether CGI Is Working

  • " ["PyCkBk-11-3"] "Section 11.3. Writing a CGI Script

  • " ["PyCkBk-11-4"] "Section 11.4. Using a Simple Dictionary for CGI Parameters

  • " ["PyCkBk-11-5"] "Section 11.5. Handling URLs Within a CGI Script

  • " ["PyCkBk-11-6"] "Section 11.6. Resuming the HTTP Download of a File

  • " ["PyCkBk-11-7"] "Section 11.7. Stripping Dangerous Tags and Javascript from HTML

  • " ["PyCkBk-11-8"] "Section 11.8. Running a Servlet with Jython

  • " ["PyCkBk-11-9"] "Section 11.9. Accessing Netscape Cookie Information

  • " ["PyCkBk-11-10"] "Section 11.10. Finding an Internet Explorer Cookie

  • " ["PyCkBk-11-11"] "Section 11.11. Module: Fetching Latitude/Longitude Data from the Web

Chapter 12. 处理XML Processing XML

  • " ["PyCkBk-12-1"] "Section 12.1. Introduction

  • " ["PyCkBk-12-2"] "Section 12.2. Checking XML Well-Formedness

  • " ["PyCkBk-12-3"] "Section 12.3. Counting Tags in a Document

  • " ["PyCkBk-12-4"] "Section 12.4. Extracting Text from an XML Document

  • " ["PyCkBk-12-5"] "Section 12.5. Transforming an XML Document Using XSLT

  • " ["PyCkBk-12-6"] "Section 12.6. Transforming an XML Document Using Python

  • " ["PyCkBk-12-7"] "Section 12.7. Parsing an XML File with xml.parsers.expat

  • " ["PyCkBk-12-8"] "Section 12.8. Converting Ad-Hoc Text into XML Markup

  • " ["PyCkBk-12-9"] "Section 12.9. Normalizing an XML Document

  • " ["PyCkBk-12-10"] "Section 12.10. Controlling XSLT Stylesheet Loading

  • " ["PyCkBk-12-11"] "Section 12.11. Autodetecting XML Encoding

  • " ["PyCkBk-12-12"] "Section 12.12. Module: XML Lexing (Shallow Parsing)

  • " ["PyCkBk-12-13"] "Section 12.13. Module: Converting a List of Equal-Length Lists into XML

Chapter 13. 分发 Distributed Programming

  • " ["PyCkBk-13-1"] "Section 13.1. Introduction

  • " ["PyCkBk-13-2"] "Section 13.2. Making an XML-RPC Method Call

  • " ["PyCkBk-13-3"] "Section 13.3. Serving XML-RPC Requests

  • " ["PyCkBk-13-4"] "Section 13.4. Using XML-RPC with Medusa

  • " ["PyCkBk-13-5"] "Section 13.5. Writing a Web Service That Supports Both XML-RPC and SOAP

  • " ["PyCkBk-13-6"] "Section 13.6. Implementing a CORBA Client and Server

  • " ["PyCkBk-13-7"] "Section 13.7. Performing Remote Logins Using telnetlib

  • " ["PyCkBk-13-8"] "Section 13.8. Using Publish/Subscribe in a Distributed Middleware Architecture

  • " ["PyCkBk-13-9"] "Section 13.9. Using Request/Reply in a Distributed Middleware Architecture

Chapter 14. 调试与测试 Debugging and Testing

  • " ["PyCkBk-14-1"] "Section 14.1. Introduction

  • " ["PyCkBk-14-2"] "Section 14.2. Reloading All Loaded Modules

  • " ["PyCkBk-14-3"] "Section 14.3. Tracing Expressions and Comments in Debug Mode

  • " ["PyCkBk-14-4"] "Section 14.4. Wrapping Tracebacks in HTML

  • " ["PyCkBk-14-5"] "Section 14.5. Getting More Information from Tracebacks

  • " ["PyCkBk-14-6"] "Section 14.6. Starting the Debugger Automatically After an Uncaught Exception

  • " ["PyCkBk-14-7"] "Section 14.7. Logging and Tracing Across Platforms

  • " ["PyCkBk-14-8"] "Section 14.8. Determining the Name of the Current Function

  • " ["PyCkBk-14-9"] "Section 14.9. Introspecting the Call Stack with Older Versions of Python

  • " ["PyCkBk-14-10"] "Section 14.10. Debugging the Garbage-Collection Process

  • " ["PyCkBk-14-11"] "Section 14.11. Tracking Instances of Particular Classes

Chapter 15. 编程 Programs About Programs

  • " ["PyCkBk-15-1"] "Section 15.1. Introduction

  • " ["PyCkBk-15-2"] "Section 15.2. Colorizing Python Source Using the Built-in Tokenizer

  • " ["PyCkBk-15-3"] "Section 15.3. Importing a Dynamically Generated Module

  • " ["PyCkBk-15-4"] "Section 15.4. Importing from a Module Whose Name Is Determined at Runtime

  • " ["PyCkBk-15-5"] "Section 15.5. Importing Modules with Automatic End-of-Line Conversions

  • " ["PyCkBk-15-6"] "Section 15.6. Simulating Enumerations in Python

  • " ["PyCkBk-15-7"] "Section 15.7. Modifying Methods in Place

  • " ["PyCkBk-15-8"] "Section 15.8. Associating Parameters with a Function (Currying)

  • " ["PyCkBk-15-9"] "Section 15.9. Composing Functions

  • " ["PyCkBk-15-10"] "Section 15.10. Adding Functionality to a Class

  • " ["PyCkBk-15-11"] "Section 15.11. Adding a Method to a Class Instance at Runtime

  • " ["PyCkBk-15-12"] "Section 15.12. Defining a Custom Metaclass to Control Class Behavior

  • " ["PyCkBk-15-13"] "Section 15.13. Module: Allowing the Python Profiler to Profile C Modules

Chapter 16. 扩展和嵌入 Extending and Embedding

  • " ["PyCkBk-16-1"] "Section 16.1. Introduction

  • " ["PyCkBk-16-2"] "Section 16.2. Implementing a Simple Extension Type

  • " ["PyCkBk-16-3"] "Section 16.3. Translating a Python Sequence into a C Array with the PySequence_Fast Protocol

  • " ["PyCkBk-16-4"] "Section 16.4. Accessing a Python Sequence Item-by-Item with the Iterator Protocol

  • " ["PyCkBk-16-5"] "Section 16.5. Returning None from a Python-Callable C Function

  • " ["PyCkBk-16-6"] "Section 16.6. Coding the Methods of a Python Class in C

  • " ["PyCkBk-16-7"] "Section 16.7. Implementing C Function Callbacks to a Python Function

  • " ["PyCkBk-16-8"] "Section 16.8. Debugging Dynamically Loaded C Extensions with gdb

  • " ["PyCkBk-16-9"] "Section 16.9. Debugging Memory Problems

  • " ["PyCkBk-16-10"] "Section 16.10. Using SWIG-Generated Modules in a Multithreaded Environment

Chapter 17. 算法 Algorithms

  • " ["PyCkBk-17-1"] "Section 17.1. Introduction

  • " ["PyCkBk-17-2"] "Section 17.2. Testing if a Variable Is Defined

  • " ["PyCkBk-17-3"] "Section 17.3. Evaluating Predicate Tests Across Sequences

  • " ["PyCkBk-17-4"] "Section 17.4. Removing Duplicates from a Sequence

  • " ["PyCkBk-17-5"] "Section 17.5. Removing Duplicates from a Sequence While Maintaining Sequence Order

  • " ["PyCkBk-17-6"] "Section 17.6. Simulating the Ternary Operator in Python

  • " ["PyCkBk-17-7"] "Section 17.7. Counting Items and Sorting by Incidence (Histograms)

  • " ["PyCkBk-17-8"] "Section 17.8. Memoizing (Caching) the Return Values of Functions

  • " ["PyCkBk-17-9"] "Section 17.9. Looking Up Words by Sound Similarity

  • " ["PyCkBk-17-10"] "Section 17.10. Computing Factorials with lambda

  • " ["PyCkBk-17-11"] "Section 17.11. Generating the Fibonacci Sequence

  • " ["PyCkBk-17-12"] "Section 17.12. Wrapping an Unbounded Iterator to Restrict Its Output

  • " ["PyCkBk-17-13"] "Section 17.13. Operating on Iterators

  • " ["PyCkBk-17-14"] "Section 17.14. Rolling Dice

  • " ["PyCkBk-17-15"] "Section 17.15. Implementing a First-In First-Out Container

  • " ["PyCkBk-17-16"] "Section 17.16. Modeling a Priority Queue

  • " ["PyCkBk-17-17"] "Section 17.17. Converting Numbers to Rationals via Farey Fractions

  • " ["PyCkBk-17-18"] "Section 17.18. Evaluating a Polynomial

  • " ["PyCkBk-17-19"] "Section 17.19. Module: Finding the Convex Hull of a Set of 2D Points

  • " ["PyCkBk-17-20"] "Section 17.20. Module: Parsing a String into a Date/Time Object Portably

Chapter 18. 索引 List of Contributors

  • " ["PyCkBk-18-a"] "Section 18.1. A

  • " ["PyCkBk-18-b"] "Section 18.2. B

  • " ["PyCkBk-18-c"] "Section 18.3. C

  • " ["PyCkBk-18-d"] "Section 18.4. D

  • " ["PyCkBk-18-f"] "Section 18.5. F

  • " ["PyCkBk-18-g"] "Section 18.6. G

  • " ["PyCkBk-18-h"] "Section 18.7. H

  • " ["PyCkBk-18-j"] "Section 18.8. J

  • " ["PyCkBk-18-k"] "Section 18.9. K

  • " ["PyCkBk-18-l"] "Section 18.10. L

  • " ["PyCkBk-18-m"] "Section 18.11. M

  • " ["PyCkBk-18-n"] "Section 18.12. N

  • " ["PyCkBk-18-p"] "Section 18.13. P

  • " ["PyCkBk-18-q"] "Section 18.14. Q

  • " ["PyCkBk-18-r"] "Section 18.15. R

  • " ["PyCkBk-18-s"] "Section 18.16. S

  • " ["PyCkBk-18-t"] "Section 18.17. T

  • " ["PyCkBk-18-u"] "Section 18.18. U

  • " ["PyCkBk-18-v"] "Section 18.19. V

  • " ["PyCkBk-18-w"] "Section 18.20. W

  • " ["PyCkBk-18-y"] "Section 18.21. Y

  • " ["PyCkBk-18-z"] "Section 18.22. Z

Zoomq::040430 09:40 Moin 整理

-- Zoom.Quiet [DateTime(2004-08-09T23:30:50Z)]

PyCookbook (last edited 2009-12-25 07:09:27 by localhost)