epyrun fails for me with: Traceback (most recent call last): File "./admin/epyrun", line 54, in ? cli() File "/usr/lib/python2.1/site-packages/epydoc/cli.py", line 202, in cli modules = _find_modules(param['modules'], param['verbosity']) File "/usr/lib/python2.1/site-packages/epydoc/cli.py", line 187, in _find_modules exec('module = %s' % name) File "<string>", line 1, in ? AttributeError: 'twisted.im' module has no attribute 'jychat' I want to thank the error for causing me to notice that epydoc has an unadorned exec (which is hardly necessary). This would, not, however, cause the error to go away -- AFAICS it is caused by jychat failing to import. A fix deep in the bowels of epydoc would be needed so AttributeError would merely cause a module to be skipped rather than the whole thing to come crumbling down.
see example
Here's an example of using generators to make long chains of deferreds easier to deal with. Using the function unwrapDeferredGenerator on a generator object will cause the generator to be run until it yields None. Each time the generator yields a deferred, the function is halted and resumed when the Deferred fires. The result of the Deferred is available in deferred.result. What used to be a long chain of callback functions can now be written as one generator function, (hopefully) making things easier to read. Donovan
participants (3)
-
Donovan Preston
-
Moshe Zadka
-
Paul Boehm