Processing.py-Bugs
Processing.py-Bugs copied to clipboard
can't import a file
Hi !
With the file "villes.csv" copied in the folder data the following code doesn't work The error message is : processing.app.SketchException: IOError: (2, 'No such file or directory', 'villes.csv')
import csv
file = open("villes.csv", "rb")
try:
reader = csv.reader(file)
for row in reader:
print(row[1],row[5],row[6])
finally:
file.close()
The file seems not able to be located by processing.py Do you have an idea ?
My guess is that, because you're using Python's native open function, you don't get the magical auto-location of a data file; only the Processing built-ins do that sort of thing (createInput and createReader, etc.).