[wxPython] Putting a telnetmethod in a textfield.

Hi !

I have a problem. I want to put a telnet method into a multilined textfield,
i have tried to use:

def connection(self):
  import telnetlib
  t = telnetlib.Telnet(self.host, int(self.port))
  textfield1.AppendText(t.interact) # I have tried to use
textfield1.write, and textfield1.WriteText, but no of them seems to work.

Any suggestions for solving my problem is appriciated :wink:

Thanks,
Thomas

I have a problem. I want to put a telnet method into a multilined

textfield,

i have tried to use:

def connection(self):
import telnetlib
t = telnetlib.Telnet(self.host, int(self.port))
textfield1.AppendText(t.interact) # I have tried to use
textfield1.write, and textfield1.WriteText, but no of them seems to work.

Any suggestions for solving my problem is appriciated :wink:

Well first of all, t.interact is a method, not a string. Secondly, interact
doesn't return a string, even if you call it. You probably want to call one
of the read_* methods of t and pass the return value to AppendText.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!