I’m new to processing with Python and I want to access subfolders in my data folder with my processing project. If I loop through the folders with os.listdir(), only see the main.pyde. I’ve already tried dataPath and dataFile but without success.
My current folder structure is:
main.pyde
sketch.properties
data
import os
def setup():
print(os.listdir("./data"))
def draw():
pass
And it works :
['folder_1', 'folder_2']
But be sure to save your file before running, it was not updating in my case so at the beginning I thought it was not working properly.
And also your error might be that you omitted to put the data folder inside the path, I know that in Processing Java the relative path is in the data folder but maybe in python it’s not the case…