Hey Dave
Sorry for the late reply.
Nothing to worry about... I've gotten things to write as 0.01, and that pretty much works for me.
However, I could EASILY put all my data into one cvs file, but don't have the python chops to make that happen. Here is the code you suggested I use to create my four files:
- Code: Select all
csv_path = '/Users/bradford/MatPlotLib/' # put your CSV Engine data path here
values = {
'RainToday': ('1970-01-01 00:00:00.000000,', indigo.variables[1852577407].value), # change these variable ids to match yours
'RainYesterday': ('1970-01-02 00:00:00.000000,', indigo.variables[35080668].value),
'RainThisWeek': ('1970-01-03 00:00:00.000000,', indigo.variables[986779847].value),
'RainThisMonth': ('1970-01-04 00:00:00.000000,', indigo.variables[1169660509].value),
}
for key in values.keys():
with open(csv_path + key + ".csv", 'w') as outfile:
outfile.write("Timestamp," + key + "\n")
outfile.write(values[key][0] + values[key][1])
I've tried several different ways to combine the value from the 4 variables into a single CVS file, but this is way past my understanding and ability. I've given thought to ways to create a new CVS Engine to gather those 4 values, but anyway I slice it, I'm still ending up with 4 different CVS files. In my perfect world, a trigger would grab those values from the 4 variables and put them into a single CVS file, and subsequent trigger events would replace the values, not add more data to the CVS file.
Regardless, thanks again so much for taking time to look into this for me.
JT