RootOfTheNull

Chris Frost's Code (Reworked)

Nov 3rd, 2013
97
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from unicurses import *
  2. stdscr = initscr()
  3. noecho()
  4. curs_set(False)
  5. keypad(stdscr,True)
  6. window1 = newwin(3,20,4,4)
  7. max_y, max_x = stdscr.getmaxyx()
  8. box = window1
  9. window2 = newwin(3,20,max_y/2,max_x/2)
  10.  
  11. box2 = window2
  12. waddstr(window1,'hello world')
  13.  
  14. running = True
  15.  
  16. panel = new_panel(window1)
  17. panel2 = new_panel(window2)
  18. update_panels()
  19. doupdate()
  20. while (running):
  21.         key = getch()
  22.         if (key == 27):
  23.                 running = False
  24.                 break
  25.         update_panels()
  26.         doupdate()
  27.  
  28. endwin()
RAW Paste Data