diff --git a/.gitignore b/.gitignore index 3c8b0ce..aca0b68 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,11 @@ * -!fusion -!fusion/datatypes.py -!fusion/device.py +!lib +!lib/datatypes.py +!lib/device.py !.gitignore !play.py -!requirements.txt +!pyproject.toml !profiles.py !test.py diff --git a/fusion/datatypes.py b/lib/datatypes.py similarity index 100% rename from fusion/datatypes.py rename to lib/datatypes.py diff --git a/fusion/device.py b/lib/device.py similarity index 100% rename from fusion/device.py rename to lib/device.py diff --git a/play.py b/play.py index 4c0500c..5aa6d6b 100644 --- a/play.py +++ b/play.py @@ -1,130 +1,135 @@ -from fusion.datatypes import * -from fusion.device import get_device +try: + from lib.datatypes import * #local script + from lib.device import get_device +except ImportError: + from .lib.datatypes import * #as a module + from .lib.device import get_device + from cv2.typing import MatLike import sys, cv2, time, numpy, atexit #10 is actually not transient - it is persistent as a secondary profile but for our purposes we can treat it as transient #since nobody should have the need to write to a profile number this high (switching between profiles require os interaction anyways so might as well write a new image) TRANSIENT_ID = 10 if len(sys.argv) < 2: print(f'Usage: {__file__}