We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e2590b9 + 47ce14f commit 412392cCopy full SHA for 412392c
adafruit_crickit.py
@@ -49,7 +49,14 @@
49
from micropython import const
50
51
#pylint: disable=wrong-import-position
52
-sys.path.insert(0, ".frozen") # Prefer frozen modules over local.
+try:
53
+ lib_index = sys.path.index("/lib") # pylint: disable=invalid-name
54
+ if lib_index < sys.path.index(".frozen"):
55
+ # Prefer frozen modules over those in /lib.
56
+ sys.path.insert(lib_index, ".frozen")
57
+except ValueError:
58
+ # Don't change sys.path if it doesn't contain "lib" or ".frozen".
59
+ pass
60
61
from adafruit_seesaw.seesaw import Seesaw
62
from adafruit_seesaw.pwmout import PWMOut
0 commit comments