Esempio n. 1
0
 def _load_com(*names):
     try:
         return load_com(*names)
     except AttributeError:
         # remove cache
         import os
         import sys
         import shutil
         for module in [m.__name__ for m in sys.modules.values()]:
             if module.startswith("win32com.gen_py."):
                 del sys.modules[module]
         shutil.rmtree(os.path.join(os.environ.get('LOCALAPPDATA'), 'Temp', 'gen_py'))
         # try again
         return load_com(*names)
Esempio n. 2
0
 def __init__(self):
     try:
         self.object = load_com("SAPI.SPVoice")
         self._voices = self._available_voices()
     except pywintypes.com_error:
         raise OutputError
     self._pitch = 0
Esempio n. 3
0
 def __init__(self):
     try:
         self.object = load_com("SAPI.SPVoice")
         self._voices = self._available_voices()
     except (pywintypes.com_error, TypeError):
         raise OutputError
     self._pitch = 0
Esempio n. 4
0
 def __init__(self):
     sapi4 = load_com("{EEE78591-FE22-11D0-8BEF-0060081841DE}")
     self._voiceNo = sapi4.Find(0)
     sapi4.Select(self._voiceNo)
     sapi4.Speak(" ")
     self.__object = sapi4
     self._voice_list = self._available_voices()
Esempio n. 5
0
 def __init__(self):
  sapi4 = load_com("{EEE78591-FE22-11D0-8BEF-0060081841DE}")
  self._voiceNo = sapi4.Find(0)
  sapi4.Select(self._voiceNo)
  sapi4.Speak(" ")
  self.__object = sapi4
  self._voice_list = self._available_voices()
Esempio n. 6
0
 def __init__(self):
  if config.main["general"]["voice_enabled"] == False: raise OutputError
  try:
   self.object = load_com("SAPI.SPVoice")
   self._voices = self._available_voices()
  except pywintypes.com_error:
   raise OutputError
  self._pitch = 0
Esempio n. 7
0
 def __init__(self, *args, **kwargs):
     super(Jaws, self).__init__(*args, **kwargs)
     try:
         self.object = load_com("FreedomSci.JawsApi", "jfwapi")
     except pywintypes.com_error:
         raise OutputError
Esempio n. 8
0
 def __init__(self, *args, **kwargs):
     super(WindowEyes, self).__init__(*args, **kwargs)
     try:
         self.object = load_com("gwspeak.speak")
     except pywintypes.com_error:
         raise OutputError
Esempio n. 9
0
 def __init__(self, *args, **kwargs):
  super (Jaws, self).__init__(*args, **kwargs)
  try:
   self.object = load_com("FreedomSci.JawsApi", "jfwapi")
  except pywintypes.com_error:
   raise OutputError
Esempio n. 10
0
 def __init__(self, *args, **kwargs):
  super(WindowEyes, self).__init__(*args, **kwargs)
  try:
   self.object = load_com("gwspeak.speak")
  except pywintypes.com_error:
   raise OutputError