Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/las.py
diff options
context:
space:
mode:
Diffstat (limited to 'las.py')
-rw-r--r--las.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/las.py b/las.py
index f9bb3be..3423e8a 100644
--- a/las.py
+++ b/las.py
@@ -44,7 +44,7 @@ class _GetchWindows:
class Listenspell():
- def __init__(self):
+ def __init__(self, SQLiteDB):
self.skill_level = 0
self.level_threshold = 5
@@ -52,12 +52,11 @@ class Listenspell():
self.words_played = 0
self.words_correct = 0
self.init = False
- self.dict_obj = Dict()
+ self.dict_obj = Dict(SQLiteDB) #Always intitiate first Dict object then Word object
self.word_obj = Word()
def start_speechd(self): # Currently not in use have to manually start sugar-speechd
- import os
pid = os.fork()
if pid:
return
@@ -122,7 +121,6 @@ class Listenspell():
def get_word_info(self,wordid, attribute):
if self.word_obj.get_wordid() != wordid:
self.word_obj.__init__(identifier = "wordid", value= wordid)
- print "Hello Again"
self.words_played = self.words_played + 1
if attribute == "def":
@@ -147,7 +145,6 @@ class Listenspell():
def get_key(self):
for longestinput in range(15):
inkey = _Getch()
- import sys
for i in xrange(sys.maxint):
k=inkey()
if k<>'':break