Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ANN: Time period library period-0.5 released

2 views
Skip to first unread message

William Annis

unread,
Jan 4, 2002, 3:54:29 PM1/4/02
to

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

0 new messages