-
Chapter 1 Getting Started
-
Installing Twisted
-
Installing from Source Files
-
Adding Twisted Utilities to Your Path
-
Using the Twisted Documentation
-
Finding Answers to Your Questions
-
-
Chapter 2 Building Simple Clients and Servers
-
Starting the Twisted Event Loop
-
Working with Asynchronous Results
-
Sending and Receiving Data
-
Accepting Connections from Clients
-
-
Chapter 3 Web Clients
-
Downloading a Web Page
-
Accessing a Password-Protected Page
-
Uploading a File
-
Checking Whether a Page Has Changed
-
Monitoring Download Progress
-
-
Chapter 4 Web Servers
-
Responding to HTTP Requests
-
Parsing HTTP Requests
-
Working with POST Data from HTML Forms
-
Managing a Hierarchy of Resources
-
Storing Web Data in an SQL Database
-
Running an HTTP Proxy Server
-
-
Chapter 5 Web Services and RPC
-
Using the REST Architecture for Web Services
-
Using a Web Client to Update Resources Through REST
-
Enabling Web Services Using XML-RPC
-
Calling XML-RPC Functions
-
Installing SOAP Libraries
-
Sharing Web Services with SOAP
-
Calling SOAP Web Services
-
Sharing Python Objects with Perspective Broker
-
-
Chapter 6 Authentication
-
Using Authentication in a Twisted Server
-
Authenticating Against a Database Table
-
Representing Users with Different Capabilities
-
Using Authentication with Perspective Broker
-
-
Chapter 7 Mail Clients
-
Downloading Mail from a POP3 Server
-
Sending Mail Using SMTP
-
Looking Up the SMTP Server for a Domain
-
Listing Mailboxes on an IMAP Server
-
Downloading Messages from an IMAP Mailbox
-
-
Chapter 8 Mail Servers
-
Accepting Mail with SMTP
-
Using SMTP as a User Interface
-
Providing POP3 Access to Mailboxes
-
Providing IMAP Access to Mailboxes
-
-
Chapter 9 NNTP Clients and Servers
-
Listing the Newsgroups on a Server
-
Downloading Usenet Articles
-
Posting a Message to an NNTP Server
-
Running a Basic NNTP Server
-
Using NNTP as a User Interface
-
-
Chapter 10 SSH
-
Setting Up a Custom SSH Server
-
Using Public Keys for Authentication
-
Providing an Administrative Python Shell
-
Running Commands on a Remote Server
-
-
Chapter 11 Services, Processes, and Logging
-
Running a Twisted Application as a Daemon
-
Setting Limits on an Application's Permissions
-
Managing Multiple Services
-
Logging Events and Errors
-
-
Colophon
- Title:
- Twisted Network Programming Essentials
- By:
- Abe Fettig
- Publisher:
- O'Reilly Media
- Formats:
-
- Ebook
- Safari Books Online
- Print Release:
- October 2005
- Ebook Release:
- June 2009
- Pages:
- 240
- Print ISBN:
- 978-0-596-10032-2
- | ISBN 10:
- 0-596-10032-9
- Ebook ISBN:
- 978-0-596-55695-2
- | ISBN 10:
- 0-596-55695-0
About the Author Abe Fettig is a software developer specializing in Internet applications. He currently works as a software enginner for JotSpot, Inc. His open source projects include Yarn, a Python library that uses Twisted to transfer information between RSS, email, weblogs, and web services. Abe lives in Portland, Maine with his wife, Hannah.
Colophon Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects.
The image on the cover of Twisted Network Programming Essentials shows a ball of snakes. When the ground begins to thaw in spring, things heat up for some species of snakes. Males emerge from their hibernation dens cold, hungry, and randy! An estimated 50,000 male snakes can fill a location such as a limestone quarry, waiting patiently for nearby females to emerge. When they do, the mating frenzy begins, and it can last up to three weeks. As many as 100 to 1,000 males will compete to mate with a single female, sometimes surrounding her before she can fully emerge from her den. The males wrap around the female, becoming a living ball that can grow to be two feet high. The constant writhing of the snakes can even propel the ball over rocks and tree roots.
In some cases, the size of the snake ball will crush the female to death. However, this does not always deter the males, who may continue to mate with her.
A female will normally mate with only one male in the ball; once a male has successfully copulated with her, he releases a pheromone that temporarily makes all other males in the ball impotent. When the female selects her partner, the ball unravels and the unsuccessful males go in search of another female.
Since it is difficult for snakes to determine the gender of their potential partner, males detect the female by using their flicking tongues to sense the female's pheromones, which stimulate the males to mate. The male rubs his chin against the grain of the female's scales to squeeze out her pheromones. It is believed that the male can also determine the position of the female by detecting the direction of her pheromones and then aligning himself with her body accordingly.
One interesting phenomenon that is still not completely understood is that of the "she-male" snake-a male that gives off female pheromones when it emerges from the ground. One theory is that weaker male snakes emerging from the cold ground may do this so that other males will surround them in a ball to warm them up and protect them from predators. Studies have shown that "she-males" in this situation will return to being normal males after about three hours. Another theory is that "she-males" use their pheromones to confuse other males, who will try to mate with the "she-male' rather than vying for the true female.
Marlowe Shaeffer was the production editor for Twisted Network Programming Essentials . Nancy Kotary was the copyeditor, and Sada Preisch was the proofreader. Marlowe Shaeffer and Claire Cloutier provided quality control. Ellen Troutman Zaig wrote the index.
Karen Montgomery designed the cover of this book, based on a series design by Edie Freedman. The cover image is a 19th-century engraving from the Dover Pictorial Archive. Karen Montgomery produced the cover layout with Adobe InDesign CS using Adobe's ITC Garamond font.
David Futato designed the interior layout. This book was converted by Keith Fahlgren to FrameMaker 5.5.6. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSans Mono Condensed. The illustrations that appear in the book were produced by Robert Romano, Jessamyn Read, and Lesley Borash using Macromedia FreeHand MX and Adobe Photoshop CS. The tip and warning icons were drawn by Christopher Bing. This colophon was written by Jansen Fernald.The production editors for
