Advertisement
Guest User

Untitled

a guest
Nov 20th, 2012
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def run(self, window):
  2. end = False
  3. while not end:
  4. window.clear()
  5. window.addstr(0,0,self.title, curses.A_BOLD)
  6. (_,width) = window.getmaxyx()
  7. width -= 8
  8. for i in range (len(self.options) ):
  9. option = self.options[i][0]
  10. if len(option) > width:
  11. option = (option[:width-5]+'...')
  12. window.addstr(i+2, 4, option)
  13. window.addstr(self.selection+2,1,"-->")
  14. window.refresh()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement