From: <sa...@po...> - 2007-05-25 17:13:03
|
Hi Skip, there is no new way to do what you would like in 0.38. However it is clearly something which would be very useful. There is an ongoing thread on the db-sig list concerning this subject: http://mail.python.org/pipermail/db-sig/2007-April/004944.html it would be great if a standardized way to handle this could be added to the DBAPI. Also could you send me the source of your modified version so that I can see if it can be merged/adapted? regards -- Sébastien Sablé Skip Montanaro a écrit : > MySQLdb allows the user to control mapping between Python types and Sybase > types on-the-fly using a converters argument to the connection constructor. > We need this sort of functionality at work to support some legacy Python > apps which expect dates to be represented in Unix epoch time, e.g.: > > conn = Connection(converters={DateTimeType: _dt_as_float}) > > I implemented this in python-sybase 0.36 but would like to stop maintaining > my own forked version of the module. Is there some way to control this > mapping on a case-by-case basis in 0.38pre1? > > Thx, > > -- > Skip Montanaro - sk...@po... - http://www.webfast.com/~skip/ > "The hippies and the hipsters did some great stuff in the sixties, > but the geeks pulled their weight too." -- Billy Bragg |