mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-08-27 10:19:22 +00:00
Updated accessible_output2. Add mac and a better linux support
This commit is contained in:
@@ -1,23 +1 @@
|
||||
from base import Output, OutputError
|
||||
|
||||
class VoiceOver (Output):
|
||||
"""Supports the VoiceOver screenreader on the Mac.
|
||||
|
||||
Note that this will also output as a message to the braille display if VoiceOver is used with braille.
|
||||
Calling this module could cause VoiceOver to be started.
|
||||
"""
|
||||
name = 'VoiceOver'
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(VoiceOver, self).__init__(*args, **kwargs)
|
||||
try:
|
||||
from appscript import app
|
||||
self.app = app('VoiceOver')
|
||||
except ImportError:
|
||||
raise OutputError
|
||||
|
||||
def speak(self, text, interupt=False):
|
||||
self.app.output(text)
|
||||
|
||||
def is_active(self):
|
||||
return True
|
||||
from __future__ import absolute_import
|
Reference in New Issue
Block a user