You have, I think, misunderstood Tom - you do not need to create a service 
or anything so complex!!

All you need to do is put his import statement INTO THE TEMPLATE for the 
page YOU WANT TO DISPLAY the version in, 

and then use the tag for the data to be displayed.

I just tried it, and it works.





On Friday, 23 September 2016 16:41:56 UTC+3, zkab wrote:

> I tried to test the operating system interfaces but I did not get it right.
> Since I included lowBattery.py in my system then I specified 'import 
> platform' in the beginning of lowBattery.py like this:
>
> #    Example of how to implement a low battery alarm in weewx. 
>
> import time
> import smtplib
> from email.mime.text import MIMEText
> import threading
> import syslog
>
> import weewx
> from weewx.engine import StdService
> from weeutil.weeutil import timestamp_to_string, option_as_list
>
> import platform
>
> # Inherit from the base class StdService:
>
> but $platform.platform() was display as '$platform.platform()'
>
> So where have I missed ... I read the documentation but have no experience 
> i Python ...
>

-- 
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