On Friday, June 5, 2020 at 12:09:47 PM UTC-4, John Kline wrote: > > You just have to be careful how you write the file (the external process). > You want something along the lines of writing to a temp file, syncing to > flush buffers and then moving that file to the filename that will be read > by weewx. > > I do not see why this is necessary, or (if you are trying to avoid weewx reading a partially written file) why your approach is necessarily better than my much simpler one. In the writing script, I am using Python's 'with open(....' syntax, so the (very small) file is opened, written to, and then immediately flushed and closed. I am not sure that it is even possible for the file to be in a state that would cause a problem when the weewx service tries to read it.
-- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/b6aef2bf-f95a-4b17-9677-807bb9a53fbeo%40googlegroups.com.