diff options
| -rw-r--r-- | boot/test.py | 1 | ||||
| -rw-r--r-- | client/speaker.py | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/boot/test.py b/boot/test.py index 4c79f39..b390d5e 100644 --- a/boot/test.py +++ b/boot/test.py @@ -5,7 +5,6 @@ if os.environ.get('JASPER_HOME') is None: import sys import unittest -from sets import Set from mock import patch import vocabcompiler diff --git a/client/speaker.py b/client/speaker.py index f2d4ab7..e7dc075 100644 --- a/client/speaker.py +++ b/client/speaker.py @@ -22,8 +22,11 @@ class MacSpeaker: def isAvailable(cls): return os.system("which say") == 0 + def shellquote(self, s): + return "'" + s.replace("'", "'\\''") + "'" + def say(self, phrase): - os.system("say " + phrase) + os.system("say " + self.shellquote(phrase)) def playSound(self, filename): os.system("afplay " + filename) |
