[Biopython-dev] zxJDBC support for BioSQL
Peter
biopython at maubp.freeserve.co.uk
Mon Jan 18 15:58:27 UTC 2010
On Wed, Jan 13, 2010 at 5:37 PM, Kyle Ellrott <kellrott at gmail.com> wrote:
> My main thought was to make it so that users can write a single script that
> would work on any Python system (eventually IronPython as well). Because
> the current system expects the user to request a specific driver (MySQLdb)
> that happens to be system specific, it forces user code to be system
> specific.
Yes, it does - as long as Jython or any other Python implementation
doesn't support that driver. In the case of SQLite, it sounds like adding
sqlite3 support to Jython is planned at least.
> One alternative would be to use the strings you describe below, but in
> addition add special requests that would check the system add pull the
> appropriate driver automatically.
> 'autoMySQL' or 'MySQL' - uses MySQLdb if in CPython, use
> org.gjt.mm.mysql.Driver if in Jython.
> Otherwise, if the user wants to use a specific driver, they pass it's name.
Maybe rather than specifying the driver, the user could specify the
database back end (MySQL, PostgreSQL, SQLite, ...) and providing
we know about this in advance, we can look up and try relevant
drivers automatically. We could offer this in combination with the
existing driver specifier. This seems cleaner than overloading the
driver argument.
Peter
More information about the Biopython-dev
mailing list