19ae6e4a31
Move gethandles and gethashtags into getmentions Make getmentions and makedb use tools
30 lines
473 B
Python
30 lines
473 B
Python
import config
|
|
|
|
import os, sqlite3
|
|
|
|
class dbObject:
|
|
|
|
def __init__(self, path=config.dbpath):
|
|
self.conn = sqlite3.connect(path)
|
|
self.cur = self.conn.cursor()
|
|
|
|
def closeConnection(self):
|
|
return self.conn.close()
|
|
|
|
def commit(self):
|
|
return self.conn.commit()
|
|
|
|
def executeQuery(self, query):
|
|
return self.cur.execute(query)
|
|
|
|
def GetConnection(self):
|
|
return self.conn
|
|
|
|
def GetCursor(self):
|
|
return self.cur
|
|
|
|
|
|
def fileExists(path):
|
|
return os.path.isfile(path)
|
|
|