[python-uk] Last Thursday's meet - roll call.

Simon Brunning python-uk@python.org
Tue, 20 Aug 2002 11:48:32 +0100


Prototype of the meet date function:

import mx.DateTime

def getNextBoozeupDate(relativeDate=None):
    """Return the date of the next Python South-East UK booze up as an
mx.DateTime.DateTime object."""
    relativeDate = relativeDate or mx.DateTime.today()
    thisMonthsBoozeupDate = getMonthsBoozeupDate()
    if thisMonthsBoozeupDate >= today:
        return thisMonthsBoozeupDate
    nextMonthsBoozeupDate = getMonthsBoozeupDate(month=today.month+1)
    return nextMonthsBoozeupDate

def getMonthsBoozeupDate(year=0, month=0):
    """Return the date of the Python South-East UK booze up in a given month
as an mx.DateTime.DateTime object.
    Optional parameters year and month default to the current date."""
    today = mx.DateTime.today()
    year = year or today.year
    month = month or today.month

    boozeupDate = mx.DateTime.DateTimeFrom(year=year, month=month) +
mx.DateTime.RelativeDateTime(weekday=(mx.DateTime.Thursday, 2))
    if boozeupDate.day == 8:
        boozeupDate = boozeupDate - 7

    return boozeupDate        
if __name__ == '__main__':
    print getNextBoozeupDate()

Needs a bit of testing, and I'll also wrap it up in a CGI, along with a
venue generator. For this, I'd like 12 suggested venues, with a URL for
each. A couple more near Paddington, perhaps one in Reading and another in
Oxford, one in South London near the Reportlab boys, that sort of thing. I
can come up with a list if need be, but suggestions would be welcome.

Well, I only need 10 actually, 'cos Chris and I found one good place -
<http://www.cubana.co.uk/main.phtml>, and I know South London pubs rather
*too* well.

Simon Brunning
TriSystems Ltd.

> -----Original Message-----
> From:	Jon Dyte [SMTP:jon@totient.demon.co.uk]
> Sent:	Monday, August 19, 2002 10:47 PM
> To:	python-uk@python.org
> Subject:	Re: [python-uk] Last Thursday's meet - roll call.
> Hi
> I was there too. Cant make this thursday, or next.
> I seem to recall we discussed the definition of the python_uk_meet
> function. Has anyone a working implementation yet?
> As for the SMS stuff. There used to be a whole free wap/sms gateway 
> here http://www.kannel.org. , though this has nowt to do with python.
> Jon
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorised. If you are not the intended recipient, any disclosure,
copying, distribution, or any action taken or omitted to be taken in
reliance on it, is prohibited and may be unlawful. TriSystems Ltd. cannot
accept liability for statements made which are clearly the senders own.