1 2 3 4 5 6 7 8
import sqlite3 import os def connect(): connection = sqlite3.connect( os.path.dirname(os.path.realpath(__file__)) + '/../../data/imok.db' ) return connection.cursor()