Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/dict.py
diff options
context:
space:
mode:
Diffstat (limited to 'dict.py')
-rwxr-xr-xdict.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/dict.py b/dict.py
index 7a956a5..c821aa2 100755
--- a/dict.py
+++ b/dict.py
@@ -10,8 +10,6 @@ __debug = True
class Dict:
- level_1 = ()
-
def __init__(self, sqliteDB = None):
if sqliteDB == None:
@@ -35,6 +33,9 @@ class Dict:
self.cur.execute("SELECT COUNT(wordid) from las_word where length = ?", (length, ))
self.num_words = self.cur.fetchone()
return self.num_words
+
+ def exit_game(self):
+ self.conn.close()
def get_random_wordid(self, length=0, numwords = 1):
@@ -188,7 +189,8 @@ class Word:
self.cur.execute("UPDATE las_phoneme SET phoneme = " + phoneme +", is_correct = 0 where wordid = ?", (self.wordid,))
self.conn.commit()
-
+ def exit_game(self):
+ self.conn.close()
if __name__ == "__main__":
k = Dict()
num_words = k.get_num_words()