diff options
author | Assim <assim@localhost.localdomain> | 2008-08-11 22:23:24 (GMT) |
---|---|---|
committer | Assim <assim@localhost.localdomain> | 2008-08-11 22:23:24 (GMT) |
commit | 3dc8eadf78593a060edb120ba4b82e2548e762a6 (patch) | |
tree | 92d2662b0d95bc97bc4de6ebd2f85bc78f12f0cc /dict.py | |
parent | 1d271d881502f5f600239253394809df053db4e2 (diff) |
configuration panel enable + json support
Diffstat (limited to 'dict.py')
-rwxr-xr-x | dict.py | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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() |