-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.py
56 lines (52 loc) · 1.22 KB
/
constants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
class Storage(dict):
"""
copied form web.py
"""
def __getattr__(self, key):
try:
return self[key]
except KeyError, k:
raise AttributeError, k
def __setattr__(self, key, value):
self[key] = value
def __delattr__(self, key):
try:
del self[key]
except KeyError, k:
raise AttributeError, k
def __repr__(self):
return '<Storage ' + dict.__repr__(self) + '>'
constants = Storage({
"regions": {
"left": 1,
"middle": 2,
"right": 3
},
"colors": {
"off": 0,
"red": 1,
"orange": 2,
"yellow": 3,
"green": 4,
"sky": 5,
"blue": 6,
"purple": 7,
"white": 8
},
"levels": {
"light": 3,
"low": 2,
"med": 1,
"high": 0
},
"modes": {
"0":0, # no effect
"normal": 1,
"gaming": 2, # left to right
"breathe": 3, # no effect
"demo": 4, # decresing light to none
"wave": 5, # no effect
"6":6, # no effect
"7":7
}
})