用这些创建:
self.pads = []
self.pads.append( [ server, channel, curses.newpad(height - 2, width) ] )
问题函数:
def writepad(self, server, channel, message): # Write a line on-to pad, but do not switch pad_num (current pad)
(height, width) = self.stdscr.getmaxyx() # Conserve code.
self.stdscr.addstr('%s\n' % str(self.pads)) # debug
for i in self.pads:
if i.count(server) and i.count(channel):
i[2].addstr('%s\n' % message)
#i[2].refresh(1, 0, 0, 0, height - 2, width) # propably useless
self.stdscr.addstr('debug: %s\n' % message)
#self.stdscr.refresh() # propably useless
输出:
[['main', 'µIRC', <_curses.curses window object at 0x7f73ff5a6b70>]]
debug: use /connect <server address>[:<server port>]
问题:
Pad addstr没有打印任何可见的内容。我用的是python3.3。你知道吗
目前没有回答
相关问题 更多 >
编程相关推荐