Exemplo n.º 1
0
 def do_send(self, data):
     lines = string.split(data, "\n")
     if lines[-1] == "":
         lines = lines[:-1]
     for l in lines:
         terminal.show_line("out", l+"\n")
     self.sock.sendall(data)
Exemplo n.º 2
0
 def do_send(self, data):
     lines = string.split(data, "\n")
     if lines[-1] == "":
         lines = lines[:-1]
     for l in lines:
         terminal.show_line("out", l + "\n")
     self.sock.sendall(data)
Exemplo n.º 3
0
 def grab_lines(self):
     data = self.partial + self.sock.recv(4096)
     got_lines = string.split(data, "\n")
     for l in got_lines[:-1]:
         terminal.show_line("in", l)
         self.lines.append(l)
     self.partial = got_lines[-1]
     return (got_lines[:-1], got_lines[-1])
Exemplo n.º 4
0
 def grab_lines(self):
     data = self.partial + self.sock.recv(4096)
     got_lines = string.split(data, "\n")
     for l in got_lines[:-1]:
         terminal.show_line("in", l)
         self.lines.append(l)
     self.partial = got_lines[-1]
     return (got_lines[:-1], got_lines[-1])