Python - inheriting from old-style classes
I am trying to connect via telnet to a laboratory instrument. I'd like to extend the Telnet class from the telnetlib module in the standard library, to include functions specific to our instrument: import telnetlib class Instrument(telnetlib.Telnet): def __init__(self, host=None, port=0, timeout=5): super(Instrument,self).__init__(host, port, timeout) All I am trying to do in this code is inherit the __init__ method from the parent class ( telnetlib.Telnet ) and pass on the standard arguments, so I can add things to __init__ later. This formula has worked for me on other occasions; this time