[Twisted-Python] Broken HOWTO documentation
I have been trying to get the examples in section 2.4 of the HOWTO to work. It looks like the documentation is out of date with the current state of the software in the CVS. starting with 2.4.2, the "app.theApplication" returns the error
a = app.theApplication Traceback (most recent call last): File "<stdin>", line 1, in ? AttributeError: 'module' object has no attribute 'theApplication' dir(app) ['Accessor', 'Application', 'ApplicationService', 'DefaultAuthorizer', 'False', 'MultiService', 'PortCollection', 'ServiceCollection', 'StopIteration', 'StringIO', 'True', '_AbstractServiceCollection', '__all__', '__builtins__', '__doc__', '__file__', '__name__', 'bool', 'defer', 'dict', 'encrypt', 'error', 'inet_ntop', 'inet_pton', 'interfaces', 'isinstance', 'iter', 'log', 'main', 'os', 'platform', 'socket', 'string', 'styles', 'types', 'warnings']
I had problems with the examples in section 2.4.3 and 2.5 as well. In section 2.5 the telnet localhost 4040 command returned a different module location instead of twisted.protocols.telnet.ShellFactory and when I ran dir(__main__) the list of names did not come close to matching what was in the example. No twisted objects were listed.
Michael McLay <mclay@python.net> writes:
I have been trying to get the examples in section 2.4 of the HOWTO to work. It looks like the documentation is out of date with the current state of the software in the CVS. starting with 2.4.2, the "app.theApplication" returns the error
a = app.theApplication Traceback (most recent call last):
twisted.internet.app.theApplication doesn't actually appear until the application starts running, usually through app.run(), and sometimes with reactor.run().
I had problems with the examples in section 2.4.3 and 2.5 as well. In section 2.5 the telnet localhost 4040 command returned a different module location instead of twisted.protocols.telnet.ShellFactory and when I ran dir(__main__) the list of names did not come close to matching what was in the example. No twisted objects were listed.
You're right, those examples were ancient. I've updated them to match the current code, and removed some of the most unhelpful pieces. thanks, -Brian
participants (2)
-
Brian Warner
-
Michael McLay