twisted-network-programming-essentials-examples
twisted-network-programming-essentials-examples copied to clipboard
The code examples for Twisted Network Programming Essentials, 2nd Edition, published by O'Reilly.
from twisted.internet import reactor from twisted.internet.task import deferLater from twisted.web.resource import Resource from twisted.web.server import Site, NOT_DONE_YET import time class BusyPage(Resource): isLeaf = True def _delayedRender(self, request): request.write(b"Finally done, at...
As it was fixed in C3ex2, the ex4 should add the ValueError() in the line7.
As seen in ex2.py, this fixes the errback not being an Exception/Failure. Off-topic: code examples aren't PEP-8. Is that intended or it's open for discussion/PR?