Not a simple question at all!

Generally, yes, you can use something similar to the tags in your code by
following the same path through the objects. For example,

$day.outTemp.latest

can be obtained by using

        stats = weewx.tags.TimeBinder(
            db_lookup,
            timespan.stop,
            formatter=self.generator.formatter,
            converter=self.generator.converter,
            week_start=self.generator.stn_info.week_start,
            rain_year_start=self.generator.stn_info.rain_year_start,
            trend=trend_dict,
            skin_dict=self.generator.skin_dict)

            latest = stats.day.outTemp.latest

This is basically all Cheetah is doing!

Hope this helps.

-tk


On Sat, Jun 24, 2017 at 8:39 AM, Thomas Carlin <thomascarl...@gmail.com>
wrote:

> Good morning everyone,
>
> I have a custom search list extension that I am working on to do some
> analysis on my collected data, and I have it to the point that I am pulling
> the data out, and can manipulate it, but to do so, I had to define my own
> timespan/binder inside my script.  (The historygenerator extension does the
> same thing).
>
> Is there any way to use the weewx defined 'latest'  or 'current' timespan
> inside my python extension?  Please forgive me if this is a simple
> question, the only programing experience that I have is self-inflicted, and
> far from complete.
>
> Thank you!
>
> --
> 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.
>

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