twitools/tools.py
Klaus-Uwe Mitterer 19ae6e4a31 Move common functions to tools.py
Move gethandles and gethashtags into getmentions
Make getmentions and makedb use tools
2015-04-21 23:07:25 +02:00

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)