Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def append_data(self, nick, data):
- string = "%s (%s): %s\n" % (time.strftime("%H:%M"),
- nick, data)
- rows, cols = self.p.getmaxyx()
- lines = int(len(string) / cols) + 1
- self.num_lines += lines
- if self.num_lines >= rows:
- self.p.resize(self.num_lines + IRCTab.INCR_SIZE, cols)
- self.scroll = True
- if self.scroll:
- self.y += lines
- self.buf += string
- self.p.addstr(string)
- def refresh_data(self, rows, cols):
- self.p.refresh(self.y, 0, 1, 0, rows - 3, cols)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement