[DB-SIG] Creating portable Python database code
Christopher Petrilli
petrilli@amber.org
Wed, 23 Feb 2000 15:06:47 -0500
alexander smishlajev [als@turnhere.com] wrote:
> in Perl DBI, moving to different database is as easy as changing
> connection setting. AFAIU the same is true for Zope. but doing
> this in Python seems to be much more tricky. am i missing
> something important?
It's not more complex in Python *IF* you keep your SQL compatible with
whatever subset works on all platforms. You just have to import a different
module and instantiate the class... e.g.:
import DCOracle
conn = DCOracle.Connection(...)
to...
import Sybase
conn = Sybase.Connection(...)
Then the 'conn' object should be have the same.
Chris
--
| Christopher Petrilli
| petrilli@amber.org