# -*- coding: utf8 -*-
"""
The Database-Modules package
for the BioCASE unit-wrapper for heterogeneous databases.

The different modules in this package are specialized on some DBMS.
Specialized features of a DB require another module.

The list of available database modules will be expanded soon.


$RCSfile: __init__.py,v $
$Revision: 872 $
$Author: markus $
$Date: 2008-04-23 16:53:01 +0200 (Mi, 23. Apr 2008) $

Contact Info:

  http://www.biocase.org/
  support@biocase.org
"""

import os, os.path
import biocase.configuration
cfg = biocase.configuration.Cfg()

def getDBMSList():
    dir = os.path.join(cfg.libLocator,'biocase','wrapper','dbmod')
    dbms = []
    for dbmod in os.listdir( dir ):
        if dbmod[:6]== 'dbmod_' and dbmod[-3:]== '.py' and os.path.isfile(os.path.join(dir, dbmod)):
            dbms.append( dbmod[6:-3] )
    return dbms
