equal
deleted
inserted
replaced
1 # Path to root directory containing tuikit package |
|
2 import sys |
|
3 sys.path.append('..') |
|
4 |
|
5 # Set system locale (needed for ncurses) |
|
6 import locale |
|
7 locale.setlocale(locale.LC_ALL, '') |
|
8 |
|
9 # Setup logging |
|
10 import logging |
|
11 logger = logging.getLogger('tuikit') |
|
12 logger.setLevel(logging.DEBUG) |
|
13 handler = logging.FileHandler(filename='tuikit.log') |
|
14 handler.setLevel(logging.DEBUG) |
|
15 formatter = logging.Formatter('%(asctime)s %(name)s %(levelname)s %(message)s') |
|
16 handler.setFormatter(formatter) |
|
17 logger.addHandler(handler) |
|
18 |
|
19 # Escape key code is also used for escape sequences. After escape code, |
|
20 # terminal waits for rest of sequence. This delay is 1 second by default. |
|
21 # Let's hope that our terminal is fast enough to handle the sequences in 200ms. |
|
22 import os |
|
23 os.environ['ESCDELAY'] = '200' |
|