ANN: Time period library period-0.5 released

William Annis annis@biostat.wisc.edu
04 Jan 2002 14:54:29 -0600


The fifth public release of the period library is available at
http://www.biostat.wisc.edu/~annis/creations/period.py.html .  The
library is designed to allow one to specify both unique and recurring
time periods symbolically.  For example, if you have some program
which should only run on Sunday evenings (say, web-log rotations), you
can specify that in your program:

        from period import in_period
        import sys

        if in_period('Sunday.Hr17-23'):
            do_something()
        else:
            sys.exit(1)         # Don't start at other times!

The most significant change to the code since previous versions is
that it is now possible to nest and group period expressions, which
makes the library much easier to use.  For example, you can now
specify a period such as '!(Monday|Friday).Hr11-14' and get a
reasonable answer.

Documentation is on the web page and is included with the source.

-- 
William Annis  -  System Administrator -  Biomedical Computing Group
"When men are inhuman, take care not to feel towards them as they do
towards other humans."                       Marcus Aurelius  VII.65