[PythonCE] strftime from the time module

Doug Marien doug@jarna.com
Thu, 18 Jul 2002 12:21:14 -0700

We use the calendar module quite a bit but we had a problem when it wanted
to import strftime from the time module.  We've been modifying calendar.py
and removing the import line, but sometimes we forget and it's becoming a
pain.  So, instead of modifying the core lib distribution, I'd like to
request that strftime be added to the time module, but have it raise an
exception with "NOT SUPPORTED" or some such.

Basically, for now, I've added this to Brad's timemodule.c:

static PyObject *
time_strftime(PyObject *self, PyObject *args)
	PyErr_SetString(PyExc_Exception, "strftime NOT SUPPORTED");
	return NULL;

static char strftime_doc[] =
"strftime(format[, tuple]) -> string\n\
NOT SUPPORTED - only here for calendar.py.";