Editing the sources in the indicated manner (plus adjusting the level of indentation of the remaining part of the function) indeed works. Editing i18n.py in the install directory doesn't suffice, however - it is necessary to edit the file in the distribution directory and then do a 'make install'. Anyway, thanks for the pointer!

However, should Mailman really require that strptime is defined? As it is now, archiving doesn't work _at_all_ in Mailman 2.x under Mac OS X 10.1.

/ Peter

On lördag, feb 22, 2003, at 22:36 Europe/Stockholm, Jon Carnes wrote:

The function is used only once in Mailman, inside i18n.py

year, mon, day, hh, mm, ss, wday, ydat, dst = time.strptime(date)

You could easily replace this line of code with a small block that does
the same thing but without referencing the strptime function.

In fact, looking at the code, it looks like there is already an existing
block that would do this for you... Try deleting the 4 lines of code
that I marked with an *


    if isinstance(date, StringType):
        try:
*            year, mon, day, hh, mm, ss, wday, ydat, dst =
                time.strptime(date)
*            tzname = time.tzname[dst and 1 or 0]
*        except ValueError:
*            try:
                wday, mon, day, hms, year = date.split()
                hh, mm, ss = hms.split(':')
                year = int(year)
                day = int(day)
                hh = int(hh)
                mm = int(mm)
                ss = int(ss)
            except ValueError:
                return date
===
If that works then you won't need the time.strptime function at all.

Good Luck - Jon

BTW: good detective work tracing down the lack of strptime function in
Max OSX v10.1!

------------------------------------------------------ Mailman-Users mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/

This message was sent to: [EMAIL PROTECTED]
Unsubscribe or change your options at
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Reply via email to