import pickle from pysqlite2 import dbapi2 as aqlite class Indexer(object): def __init__(self,db,voc): self.con = sqlite.connect(db) self.voc = voc def __del__(self): self.con.close() def db_commit(self): self.con.commit() def create_tables(self): self.con.execute('create table imlist(filename)') self.con.execute('create table imwords(imid,wordid,vocname)') self.con.execute('create table imhistograms(imid,histogram,vocname)') self.db_commit()
python建立数据库
最新推荐文章于 2024-08-28 19:34:23 发布