adafruit / Adafruit_CircuitPython_Slideshow

CircuitPython helper library for displaying a slideshow of images on a board with a built-in display.
MIT License
4 stars 11 forks source link

Fails if using an image folder other than "/" #7

Closed kattni closed 6 years ago

kattni commented 6 years ago

Currently the library fails if you change the image folder to anything but "/".

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Traceback (most recent call last):
  File "code.py", line 7, in <module>
  File "adafruit_slideshow.py", line 195, in __init__
  File "adafruit_slideshow.py", line 294, in advance
OSError: [Errno 2] No such file/directory
ladyada commented 6 years ago

use

[folder+"/"+f for f in os.listdir(folder) if (f.endswith(".bmp") and not f.startswith("."))]