[Patches] [ python-Patches-1520081 ] telnetlib.py change to ease option handling.

SourceForge.net noreply at sourceforge.net
Mon Jul 10 18:48:52 CEST 2006


Patches item #1520081, was opened at 2006-07-10 18:48
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1520081&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Modules
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Ernest ter Kuile (ernestjwtk)
Assigned to: Nobody/Anonymous (nobody)
Summary: telnetlib.py change to ease option handling.

Initial Comment:
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.



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1520081&group_id=5470


More information about the Patches mailing list