Tom
I've got 
#set $fd = open("path to file", "r")
#set intemp = $fd.readline()
#$fd.close()

should it work??  Not sure from your answer where # is needed and whether 
one just uses open or need to use open and specify the mode



On Thursday, 10 August 2017 19:37:03 UTC+3, Tom Keffer wrote:

> Super easy.
>
> #set $fd = open('myfile.txt)
> $fd.read()
> $fd.close()
>
> -tk
>
> On Thu, Aug 10, 2017 at 9:00 AM, Andrew Milner <andrew.s...@gmail.com 
> <javascript:>> wrote:
>
>> I'm sure I can be done - but how??  I want to add some python code to a 
>> template to read a data file when the html page is being created to 
>> override a field currently obtained from the archive.  How do I change the 
>> template to do this simple piece of python code???
>>
>> -- 
>> 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+...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to