import re
import time
import stat
-import profile
-import sqlite3
-import MySQLdb
import fileinput
import tempfile
import optparse
return res
def __init__(self, options, tables, ctxcols, evcols):
+ import MySQLdb
+
args = dict()
if options.password:
args['passwd'] = options.password
class EmitSqlite3(EmitBase):
def __init__(self, options, tables, ctxcols, evcols):
+ import sqlite3
+
if os.path.isfile(options.database):
os.unlink(options.database)
engines = { 'sqlite3': EmitSqlite3, 'mysql': EmitMysqlInfile }
def find_heads(self):
n_ev = 0
- ctxind = 0
- evind = 0
- ctxcols = dict()
- evcols = dict()
+ ctxind = 0
+ evind = 0
+ ctxcols = dict()
+ evcols = dict()
self.valid_keys = set()
for line in self.input():
- heads = None
if line[0] == 'P':
ind = line.index(';', 2)
key = line[2:ind]