Message50645
Telnetlib.py has no automatic telnet option handling
mechanism except for the possibility to register a
callback function. If set, the callback is used for
each option as they arrive. If not set, options are
negated.
Using this mechanisme is not elegant when extending the
telnet class in a OO way, and there is currently no
other way to handle this data.
This patch adds to the callback mechanisme by also
calling an internal function handle_option(), which by
default doesn't do much. This function could then do
something usefull when extending the telnet class.
For backwards compatibility, the current callback
mechanism has not been removed, and, if used, has
priority over the internal function handle_option(),
which is then ignored.
Furthermore to explain the telnet option system, a lot
of comments have been added.
|
|
Date |
User |
Action |
Args |
2007-08-23 15:53:25 | admin | link | issue1520081 messages |
2007-08-23 15:53:25 | admin | create | |
|