From syd at plug.ca  Thu Mar  8 13:36:09 2007
From: syd at plug.ca (Sydney Weidman)
Date: Thu, 08 Mar 2007 12:36:09 -0600
Subject: [Python Wpg] Python test for DST correctness
Message-ID: <1173378969.3228.51.camel@localhost.localdomain>

Hi all!

I thought I'd quickly try to whip something up in python that would test
to see if the correct DST rules are in place, but I couldn't seem to get
it to work properly. This test fails on platforms that have the correct
timezone files in place and on those that don't. Does anyone have a
suggestion for how to do this? I have included my tiny unittest that I
thought would do it, but I've obviously made some incorrect assumption
about how the Python datetime library works. I realize I could just do
os.system('date -d "15 March") and check the output for CDT instead of
CST, but I thought there would be a more Pythonic way to do it.

Regards,
Syd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testdst.py
Type: text/x-python
Size: 553 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/winnipeg/attachments/20070308/76b1ed67/attachment.py>

From sweidman at parit.ca  Thu Mar  8 13:13:31 2007
From: sweidman at parit.ca (Sydney Weidman)
Date: Thu, 08 Mar 2007 12:13:31 -0600
Subject: [Python Wpg] [Fwd: announcing python bindings for GnuCash]
Message-ID: <1173377611.3228.38.camel@localhost.localdomain>

Congratulations to Mark Jenkins on getting this out!

I look forward to being able to extend GnuCash using Python now.

Regards,
Syd
-------------- next part --------------
An embedded message was scrubbed...
From: Mark Jenkins <mark at parit.ca>
Subject: announcing python bindings for GnuCash
Date: Wed, 07 Mar 2007 14:18:25 -0600
Size: 5087
URL: <http://mail.python.org/pipermail/winnipeg/attachments/20070308/ea033c2a/attachment.mht>

From mark at parit.ca  Thu Mar  8 15:41:43 2007
From: mark at parit.ca (Mark Jenkins)
Date: Thu, 08 Mar 2007 14:41:43 -0600
Subject: [Python Wpg] Python test for DST correctness
In-Reply-To: <1173378969.3228.51.camel@localhost.localdomain>
References: <1173378969.3228.51.camel@localhost.localdomain>
Message-ID: <45F07507.6090107@parit.ca>

from datetime import datetime
from time import time

SECONDS_PER_MINUTE = 60
MINUTES_PER_HOUR = 60
HOURS_PER_DAY=24
DAYS_AHEAD=8

now = time()
later = now + \
SECONDS_PER_MINUTE*MINUTES_PER_HOUR*HOURS_PER_DAY*DAYS_AHEAD

print datetime.fromtimestamp(now).hour
print datetime.fromtimestamp(later).hour



From syd at plug.ca  Tue Mar 27 17:23:54 2007
From: syd at plug.ca (Sydney Weidman)
Date: Tue, 27 Mar 2007 16:23:54 -0500
Subject: [Python Wpg] WinniPUG Meeting tomorrow!!
Message-ID: <1175030634.3265.38.camel@wowhealth.localdomain>

The monthly meeting of the Winnipeg Python Users Group takes place
tomorrow (Wednesday, Mar 28) at 7:30 PM at Room 2M70 at the University
of Winnipeg. 

This month's presentation will feature me (Syd) giving an introduction
to the Django web application framework. For more information on Django,
see http://www.djangoproject.com

You can find room 2M70 by going in the front doors of Centennial Hall
(the brown building just down the main path from the "castle" Wesley
Hall) up the escalator to the second floor. Go through the first hallway
on your right, then turn left and room 2M70 should be the first or
second door on your right.

See you there!

Regards,
Syd Weidman