summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2014-12-04 16:56:49 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2014-12-04 17:20:53 +0100
commit87bdc5e4b5a788547764e1c222008a6c7c54232a (patch)
tree38d7d24f8f52b41ea3017f3e05edda62a210fb18 /client
parent68e5c979ad6f643af23a8c1e5895c8bb38527328 (diff)
downloadjasper-client-87bdc5e4b5a788547764e1c222008a6c7c54232a.tar.gz
jasper-client-87bdc5e4b5a788547764e1c222008a6c7c54232a.zip
Use Python-3-style print function to match coding style
This also makes a possible transition to Python 3.x easier
Diffstat (limited to 'client')
-rw-r--r--client/local_mic.py2
-rw-r--r--client/modules/MPDControl.py6
-rw-r--r--client/stt.py10
-rw-r--r--client/vocabcompiler.py2
4 files changed, 11 insertions, 9 deletions
diff --git a/client/local_mic.py b/client/local_mic.py
index a58370d..5c0fed2 100644
--- a/client/local_mic.py
+++ b/client/local_mic.py
@@ -29,4 +29,4 @@ class Mic:
return input
def say(self, phrase, OPTIONS=None):
- print "JASPER: " + phrase
+ print("JASPER: %s" % phrase)
diff --git a/client/modules/MPDControl.py b/client/modules/MPDControl.py
index 2548237..ee0904b 100644
--- a/client/modules/MPDControl.py
+++ b/client/modules/MPDControl.py
@@ -131,10 +131,10 @@ class MusicMode(object):
# self.mic.say("Found songs")
# self.music.play(songs = songs)
- # print "SONG RESULTS"
- # print "============"
+ # print("SONG RESULTS")
+ # print("============")
# for song in songs:
- # print "Song: %s Artist: %s" % (song.title, song.artist)
+ # print("Song: %s Artist: %s" % (song.title, song.artist))
# self.mic.say("Playing %s" % self.music.current_song())
diff --git a/client/stt.py b/client/stt.py
index 543a322..9eb07e7 100644
--- a/client/stt.py
+++ b/client/stt.py
@@ -138,11 +138,13 @@ class PocketSphinxSTT(AbstractSTTEngine):
self._logger.debug(line.strip())
f.truncate()
- print "==================="
- print "JASPER: " + result[0]
- print "==================="
+ transcribed = [result[0]]
- return [result[0]]
+ print("===================")
+ print("JASPER: %r" % transcribed)
+ print("===================")
+
+ return transcribed
@classmethod
def is_available(cls):
diff --git a/client/vocabcompiler.py b/client/vocabcompiler.py
index 0fb668a..ed9f425 100644
--- a/client/vocabcompiler.py
+++ b/client/vocabcompiler.py
@@ -388,7 +388,7 @@ if __name__ == '__main__':
base_dir = args.base_dir if args.base_dir else tempfile.mkdtemp()
phrases = get_all_phrases()
- print "Module phrases: %r" % phrases
+ print("Module phrases: %r" % phrases)
for subclass in AbstractVocabulary.__subclasses__():
if hasattr(subclass, 'PATH_PREFIX'):