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, 'enum.Enum', 'Enum', (['"""Directions"""', '"""N NE E SE S SW W NW"""'], {}), False, 'from enum import Enum\n'), (15, 'window.Window', 'Window', (['window_size', 'window_size', 'selector_map', 'selector_size', 'selector_size'], {}), False, 'from window import Window\n'), (22, 'functools.partial', 'partial', (['say', '"""northwast"""'], {}), False, 'from functools import partial\n'), (23, 'functools.partial', 'partial', (['say', '"""north"""'], {}), False, 'from functools import partial\n'), (24, 'functools.partial', 'partial', (['say', '"""neorthest"""'], {}), False, 'from functools import partial\n'), (25, 'functools.partial', 'partial', (['say', '"""western"""'], {}), False, 'from functools import partial\n'), (26, 'functools.partial', 'partial', (['say', '"""easy"""'], {}), False, 'from functools import partial\n'), (27, 'functools.partial', 'partial', (['say', '"""suess whest"""'], {}), False, 'from functools import partial\n'), (28, 'functools.partial', 'partial', (['say', '"""sissy"""'], {}), False, 'from functools import partial\n'), (29, 'functools.partial', 'partial', (['say', '"""seoul"""'], {}), False, 'from functools import partial\n')]