--- /usr/lib/python2.5/calendar.py~ 2007-11-04 02:44:03.000000000 +0100 +++ /usr/lib/python2.5/calendar.py 2007-11-04 02:49:10.000000000 +0100 @@ -502,9 +502,11 @@ def __init__(self, firstweekday=0, locale=None): TextCalendar.__init__(self, firstweekday) - if locale is None: - locale = locale.getdefaultlocale() - self.locale = locale + lok = locale + if lok is None: + import locale + lok = locale.getdefaultlocale() + self.locale = lok def formatweekday(self, day, width): with TimeEncoding(self.locale) as encoding: