This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jimjjewett
Date 2007-03-19.01:04:52
SpamBayes Score
Marked as misclassified
(1)  In the example code, why is parms backquoted?  My first thought was that it was for repr, which won't work in Py3, particularly since it isn't quoted on the previous line.

+            parms = self.read_sb_data()
+            self.msg('IAC SB %d %s IAC SE', ord(opt), `parms`)

(2)  There are advantages to the old callback way.  It is easier to change things per-instance, at runtime, and even mid-connection.  It might be worth showing an example that restores the current model.

    option_callback=None # class default
    def set_option_negotiation_callback(self, callback):
        """Provide a callback function called after each receipt of a telnet option."""
        self.option_callback = callback

    def handle_option(self, command, option):
        if self.option_callback is not None:
            return self.option_callback(self, command, option)

Date User Action Args
2007-08-23 15:57:28adminlinkissue1678077 messages
2007-08-23 15:57:28admincreate