how can i check if path exist in micropython:
if not os.path.exists(b):
os.mkdir(b)
if not os.path.exists(vers):
os.mkdir(vers)
doesn't work i got this error:
AttributeError: 'module' object has no attribute 'path'
esp8266 & esp32
Re: esp8266 & esp32
You can use os.stat() in a tray(except clause to check, if the file exists. or you can just try to create the directory in a try/execpt clause.