Python curses conversion of terminal commands


/ Published in: Python
Save to your folder(s)



Copy this code and paste it in your HTML
  1. # Clear BOL
  2. curses.tigetstr('el1')
  3. '\x1b[1K$<3>'
  4.  
  5. # Clear EOL
  6. curses.tigetstr('el')
  7. '\x1b[K$<3>'
  8.  
  9. # Up
  10. curses.tigetstr('cuu1')
  11. '\x1b[A$<2>'
  12.  
  13. # Down
  14. curses.tigetstr('cud1')
  15. '\n'
  16.  
  17. # Left
  18. curses.tigetstr('cub1')
  19. '\x08'
  20.  
  21. # Right
  22. curses.tigetstr('cuf1')
  23. '\x1b[C$<2>'

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.