<s> """<STR_LIT>""" <EOL> __docformat__ = "<STR_LIT>" <EOL> import re <EOL> import time <EOL> import os <EOL> import sys <EOL> from datetime import date , datetime <EOL> from grizzled . exception import ExceptionWithMessage <EOL> from grizzled . decorators import abstract <EOL> from grizzled . db import ( base , dummydb , dbgadfly , mysql , oracle , postgresql , <EOL> sqlite , sqlserver ) <EOL> from grizzled . db . base import * <EOL> __all__ = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' ] <EOL> DummyDriver = dummydb . DummyDriver <EOL> GadflyDriver = dbgadfly . GadflyDriver <EOL> MySQLDriver = mysql . MySQLDriver <EOL> OracleDriver = oracle . OracleDriver <EOL> PostgreSQLDriver = postgresql . PostgreSQLDriver <EOL> SQLite3Driver = sqlite . SQLite3Driver <EOL> SQLServerDriver = sqlserver . SQLServerDriver <EOL> drivers = { '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' } <EOL> apilevel = '<STR_LIT>' <EOL> threadsafety = '<STR_LIT:1>' <EOL> paramstyle = None <EOL> def add_driver ( key , driver_class , force = False ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> drivers [ key ] <EOL> if not force : <EOL> raise ValueError , '<STR_LIT>' % key <EOL> except KeyError : <EOL> pass <EOL> drivers [ key ] = driver_class <EOL> def get_drivers ( ) : <EOL> """<STR_LIT>""" <EOL> return [ str ( d ) for d in drivers . values ( ) ] <EOL> def get_driver_names ( ) : <EOL> """<STR_LIT>""" <EOL> return drivers . keys ( ) <EOL> def get_driver ( driver_name ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> o = drivers [ driver_name ] <EOL> if type ( o ) == str : <EOL> exec '<STR_LIT>' % o <EOL> else : <EOL> d = o ( ) <EOL> return d <EOL> except KeyError : <EOL> raise ValueError , '<STR_LIT>' % driver_name </s>
