from enum import Enum
from window import Window

D = Enum ('Directions','N NE E SE S SW W NW')

selector_map = {
        D.NW: [0.5,0.5], D.N: [1.5,0], D.NE: [2.5,0.5],
        D.W: [0,1.5],                    D.E: [3,1.5],
        D.SW: [0.5,2.5], D.S: [1.5,3], D.SE: [2.5,2.5],
        }

selector_size = 100
window_size = selector_size*4

window = Window (window_size,window_size,selector_map,selector_size,selector_size)

# set actions here
from functools import partial
def say (something):
    print (''.join (('Me: "',something,'"')))

window.actions[D.NW] = partial (say,'northwast')
window.actions[D.N] = partial (say,'north')
window.actions[D.NE] = partial (say,'neorthest')
window.actions[D.W] = partial (say,'western')
window.actions[D.E] = partial (say,'easy')
window.actions[D.SW] = partial (say,'suess whest')
window.actions[D.S] = partial (say,'sissy')
window.actions[D.SE] = partial (say,'seoul')

window.go ()

[((4, 4, 4, 45), 'enum.Enum', 'Enum', ({(4, 10, 4, 22): '"""Directions"""', (4, 23, 4, 44): '"""N NE E SE S SW W NW"""'}, {}), "('Directions', 'N NE E SE S SW W NW')", False, 'from enum import Enum\n'), ((15, 9, 15, 82), 'window.Window', 'Window', ({(15, 17, 15, 28): 'window_size', (15, 29, 15, 40): 'window_size', (15, 41, 15, 53): 'selector_map', (15, 54, 15, 67): 'selector_size', (15, 68, 15, 81): 'selector_size'}, {}), '(window_size, window_size, selector_map, selector_size, selector_size)', False, 'from window import Window\n'), ((22, 23, 22, 48), 'functools.partial', 'partial', ({(22, 32, 22, 35): 'say', (22, 36, 22, 47): '"""northwast"""'}, {}), "(say, 'northwast')", False, 'from functools import partial\n'), ((23, 22, 23, 43), 'functools.partial', 'partial', ({(23, 31, 23, 34): 'say', (23, 35, 23, 42): '"""north"""'}, {}), "(say, 'north')", False, 'from functools import partial\n'), ((24, 23, 24, 48), 'functools.partial', 'partial', ({(24, 32, 24, 35): 'say', (24, 36, 24, 47): '"""neorthest"""'}, {}), "(say, 'neorthest')", False, 'from functools import partial\n'), ((25, 22, 25, 45), 'functools.partial', 'partial', ({(25, 31, 25, 34): 'say', (25, 35, 25, 44): '"""western"""'}, {}), "(say, 'western')", False, 'from functools import partial\n'), ((26, 22, 26, 42), 'functools.partial', 'partial', ({(26, 31, 26, 34): 'say', (26, 35, 26, 41): '"""easy"""'}, {}), "(say, 'easy')", False, 'from functools import partial\n'), ((27, 23, 27, 50), 'functools.partial', 'partial', ({(27, 32, 27, 35): 'say', (27, 36, 27, 49): '"""suess whest"""'}, {}), "(say, 'suess whest')", False, 'from functools import partial\n'), ((28, 22, 28, 43), 'functools.partial', 'partial', ({(28, 31, 28, 34): 'say', (28, 35, 28, 42): '"""sissy"""'}, {}), "(say, 'sissy')", False, 'from functools import partial\n'), ((29, 23, 29, 44), 'functools.partial', 'partial', ({(29, 32, 29, 35): 'say', (29, 36, 29, 43): '"""seoul"""'}, {}), "(say, 'seoul')", False, 'from functools import partial\n')]