forked from natelewis/pi-led-matrix
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathload_effect.py
More file actions
23 lines (21 loc) · 629 Bytes
/
Copy pathload_effect.py
File metadata and controls
23 lines (21 loc) · 629 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import os
import sys
import inspect
from led_matrix import Matrix, pixel_height, pixel_width
effect_module = 'effects/' + sys.argv[1]
sys.path.append(effect_module)
effect_dir = os.path.realpath(
os.path.abspath(
os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0], effect_module)
)
)
sys.path.insert(0, effect_dir)
print("starting " + effect_module)
import effect # pylint: disable=wrong-import-position, wrong-import-order
matrix = Matrix()
effect.run(matrix, {
'pixel_height': pixel_height,
'pixel_width': pixel_width,
'effect_dir': effect_dir,
'argv': sys.argv[2:],
})