Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workaround for python 2 % vs + presedence issue #725

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions client/populate.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,12 @@ def verifyLocation(place):
"google": "GOOGLE_SPEECH"
}

response = raw_input("\nIf you would like to choose a specific STT " +
"engine, please specify which.\nAvailable " +
"implementations: %s. (Press Enter to default " +
"to PocketSphinx): " % stt_engines.keys())
# Join text in msg to work around + and % issue with Python 2
msg = "\nIf you would like to choose a specific STT " + \
"engine, please specify which.\nAvailable " + \
"implementations: %s. (Press Enter to default " + \
"to PocketSphinx): "
response = raw_input(msg % stt_engines.keys())
if (response in stt_engines):
profile["stt_engine"] = response
api_key_name = stt_engines[response]
Expand Down