[DB-SIG] ctsybasemodule problem and dbi question

M.-A. Lemburg mal@lemburg.com
Thu, 25 Feb 1999 16:33:05 +0100

Cameron Mellor wrote:
> Background:
> I'm toying with Sybase, Python, and ctsybasemodule, and looking at the idea
> of writing some date- and calendar*-related functions using dbiDates as my
> "standard" dates.

I'd suggest dumping the dbi date/time implementations and using
the type from mxDateTime instead. They provide an easy to use
C API and work great from inside Python.

mxDateTime can be found here:


An application using mxDateTime's C API is here:


> On another related note, is anyone thinking about standardising the DBI
> helper implementations? I've got both ctsybasemodule and DCOracle (tho' it's
> not much use to me :-/) and the implementations are different (umm, C vs.
> Python). Is there some fundamental problem with providing a single version
> and having the DB module translate native format to DBI-standard format? Or
> is it just inertia? :-)

I think dbi is not really needed anymore: The only two types I can
think of where it has some use are date/time values (use mxDateTime
for those) and RAW input values (don't know how important it is
to be able to differentiate between plain strings and RAW input --
plain Python strings work just fine for mxODBC in both modes).

Other things that are not defined in the DB API Spec's dbi are
monetary types. Those might be useful too... as immutable C extension
types with C API.

Marc-Andre Lemburg                               Y2000: 309 days left
          : Python Pages >>> http://starship.skyport.net/~lemburg/  :