On Mon, Sep 26, 2016 at 10:05 PM, Russell Senior <[email protected]>
wrote:

>
> You probably shouldn't be re-opening the file everytime through the
> loop.  Do it once in setup.  If you have more than one file to write to,
> open all of them.  Or if you don't know how many files you are going to
> open, keep track of which ones you've opened and only open a new one
> when you have to.


 The loop top is only for opening a new file.  Writing the data to the file
is done within the while loop.  This way I can limit the number of data
points within a file.  When taking data for real (rather than for testing
and calibration) that will likely be a week or so worth of data.  I am
considering changing from a limited number of records in the file to
creating a new file at a week or month boundary.  But as it stands, I am
not reopening the file within the loop, except that the poster fat16lib
says that print closes the file each time, so I need to change the file
opening command to avoid that.

-Denis
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to