fix missspelling

This commit is contained in:
chrys 2016-09-05 21:19:47 +02:00
parent f65332ad2d
commit a24bd9a6c9
3 changed files with 13 additions and 10 deletions

View File

@ -71,7 +71,7 @@ charEcho=False
# echo deleted chars # echo deleted chars
charDeleteEcho=True charDeleteEcho=True
# echo word after pressing space # echo word after pressing space
wordEcho=True wordEcho=False
# interrupt speech on any keypress # interrupt speech on any keypress
interruptOnKeyPress=False interruptOnKeyPress=False

View File

@ -1,22 +1,23 @@
#!/bin/python #!/bin/python
from utils import word_utils from utils import word_utils
initialized = False
try:
import enchant
initialized = True
except:
print('nööP')
class command(): class command():
def __init__(self): def __init__(self):
self.initialized = False
try:
import enchant
self.initialized = True
except:
pass pass
def run(self, environment): def run(self, environment):
if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'general', 'autoSpellCheck'): if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'general', 'autoSpellCheck'):
return environment return environment
if not self.initialized: if not initialized:
environment['runtime']['outputManager'].presentText(environment, 'pychant is not installed', interrupt=True) environment['runtime']['outputManager'].presentText(environment, 'pychant is not installed', interrupt=True)
return environment
spellChecker = enchant.Dict(environment['runtime']['settingsManager'].getSetting(environment, 'general', 'spellCheckLanguage')) spellChecker = enchant.Dict(environment['runtime']['settingsManager'].getSetting(environment, 'general', 'spellCheckLanguage'))
# just when cursor move worddetection is needed # just when cursor move worddetection is needed

View File

@ -39,6 +39,7 @@ class commandManager():
if environ != None: if environ != None:
environment = environ environment = environ
except Exception as e: except Exception as e:
print(e)
environment['runtime']['debug'].writeDebugOut(environment,"Error while executing trigger:" + trigger + "." + cmd ,debug.debugLevel.ERROR) environment['runtime']['debug'].writeDebugOut(environment,"Error while executing trigger:" + trigger + "." + cmd ,debug.debugLevel.ERROR)
environment['runtime']['debug'].writeDebugOut(environment,str(e),debug.debugLevel.ERROR) environment['runtime']['debug'].writeDebugOut(environment,str(e),debug.debugLevel.ERROR)
return environment return environment
@ -52,6 +53,7 @@ class commandManager():
if environ != None: if environ != None:
environment = environ environment = environ
except Exception as e: except Exception as e:
print(e)
environment['runtime']['debug'].writeDebugOut(environment,"Error while executing command:" + section + "." + currCommand ,debug.debugLevel.ERROR) environment['runtime']['debug'].writeDebugOut(environment,"Error while executing command:" + section + "." + currCommand ,debug.debugLevel.ERROR)
environment['runtime']['debug'].writeDebugOut(environment,str(e),debug.debugLevel.ERROR) environment['runtime']['debug'].writeDebugOut(environment,str(e),debug.debugLevel.ERROR)
environment['commandInfo']['currCommand'] = '' environment['commandInfo']['currCommand'] = ''