Putting all the code from the current master branch of TWBlue

This commit is contained in:
2014-10-27 16:29:04 -06:00
parent 58c82e5486
commit 1af4a8b291
284 changed files with 58760 additions and 0 deletions

32
src/output.py Normal file
View File

@@ -0,0 +1,32 @@
# *- coding: utf-8 -*-
import logging as original_logging
logging = original_logging.getLogger('core.output')
from accessible_output2 import outputs
import sys
speaker = None
def speak(text, interrupt=0):
global speaker
if not speaker:
setup()
speaker.speak(text,interrupt)
def setup ():
global speaker
logging.debug("Initializing output subsystem.")
try:
# speaker = speech.Speaker(speech.outputs.Sapi5())
# else:
speaker = outputs.auto.Auto()
except:
return logging.exception("Output: Error during initialization.")
def Copy(text):
import win32clipboard
#Copies text to the clipboard.
win32clipboard.OpenClipboard()
win32clipboard.EmptyClipboard()
win32clipboard.SetClipboardText(text)
win32clipboard.CloseClipboard()