I have the following script running.
import glob import csv path = system.file.openFile("csv") if path != None: for fname in glob.glob(path): system.gui.messageBox(str(fname)) f = open(fname) csv_RosterData = csv.reader(f) csv_RosterData = list(csv_RosterData) f.close() #Return CSV data. system.gui.messageBox(str(csv_RosterData))
I have two files.
When I run the script selecting Tuesday.CSV I get roster.CSV data showing up. Even when I delete roster.CSV and select Tuesday.CSV I still get roster.CSV data. Is Ignition holding onto the data in memory somewhere? I’m not sure how to overcome this particular problem…
EDIT: In my infinite wisdom I put a CSV file called Tuesday.CSV in another location with the data of roster.CSV. I was picking the wrong file path all along.