Python and Sybase

Alex Martelli aleaxit at yahoo.com
Fri Sep 24 19:09:05 EDT 2004


Josh Close <narshe at gmail.com> wrote:

> > Also, is there any module that provides a generic DB API and can be
> > hooked to both Sybase and postgresql?  This
> > (http://www.python.org/peps/pep-0249.html) looks pretty old.
> 
> Why would you need that? Python has a DB API, so all you have to do to
> change from db to db is the connection string.
> 
> conn = Sybase.connection(.....)
> conn = otherModules.connection(....)
> 
> Everthing else should work the same way.

...except that you may need to use different placeholders in SQL strings
for parameters to insert (sigh)...


Alex



More information about the Python-list mailing list