Standard escape codes are prefixed with Escape:
- Ctrl-Key:
^[ - Octal:
\033 - Unicode:
\u001b - Hexadecimal:
\x1B - Decimal:
27
| #!/usr/bin/env python | |
| """python-xlib example which reacts to changing the active window/title. | |
| Requires: | |
| - Python | |
| - python-xlib | |
| Tested with Python 2.x because my Kubuntu 14.04 doesn't come with python-xlib | |
| for Python 3.x. |
| import wnck | |
| import gtk | |
| import time | |
| if __name__ == '__main__': | |
| screen = wnck.screen_get_default() | |
| screen.force_update() | |
| while True: | |
| while gtk.events_pending(): | |
| gtk.main_iteration() |
| import os | |
| import sys | |
| import readline | |
| import glob | |
| class tabCompleter(object): | |
| """ | |
| A tab completer that can either complete from | |
| the filesystem or from a list. | |