在下面的代码中,box.ather()删除了文本中的空行.有没有办法收集包括空行在内的文本?
from curses import wrapper
from curses.textpad import Textbox
def main(stdscr):
stdscr.addstr(0, 0, "Enter text separated by empty lines: (hit Ctrl-G to send)")
box = Textbox(stdscr)
box.edit()
return box.gather()
if __name__ == '__main__':
s = wrapper(main)
print(s)