def install_as_MySQLdb():
 sys.modules['MySQLdb'] = sys.modules['_mysql'] = sys.modules['pymysql']

def install_as_MySQLdb ( ) : sys . modules [ 'MySQLdb' ] = sys . modules [ '_mysql' ] = sys . modules [ 'pymysql' ]
after this function is called .