From 985d68da6cab51897d834da5440c0656bb844a5b Mon Sep 17 00:00:00 2001 From: timmahrt Date: Fri, 19 Jun 2015 17:29:19 -0500 Subject: [PATCH] REFACTOR: Change print statement to print function --- pysle/praattools.py | 6 +++--- test/basicExamples.py | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pysle/praattools.py b/pysle/praattools.py index 0db6803..6a246f9 100644 --- a/pysle/praattools.py +++ b/pysle/praattools.py @@ -56,17 +56,17 @@ def syllabifyTextgrid(isleDict, tg, wordTierName, phoneTierName, word, phoneList) except isletool.WordNotInISLE: - print "Word ('%s') not is isle -- skipping syllabification" % word + print("Word ('%s') not is isle -- skipping syllabification" % word) continue except (pronunciationtools.NullPronunciationError): - print "Word ('%s') has no provided pronunciation" % word + print("Word ('%s') has no provided pronunciation" % word) continue syllableList = returnList[1] stressIndexList = returnList[3] i = 0 -# print syllableList +# print(syllableList) for k, syllable in enumerate(syllableList): # Create the syllable tier entry diff --git a/test/basicExamples.py b/test/basicExamples.py index 877db9f..d49ba40 100644 --- a/test/basicExamples.py +++ b/test/basicExamples.py @@ -20,13 +20,13 @@ firstEntry = lookupResults[0] firstSyllableList = firstEntry[0] firstStressList = firstEntry[1] -print searchWord -print firstSyllableList, firstStressList # 3rd syllable carries stress +print(searchWord) +print(firstSyllableList, firstStressList) # 3rd syllable carries stress # Here we determine the syllabification of a word, as it was said. # (Of course, this is just a guess) -print '-'*50 +print('-'*50) searchWord = 'another' anotherPhoneList = ['n', '@', 'th', 'r'] @@ -37,8 +37,8 @@ returnList = pronunciationtools.findBestSyllabification(isleDict, stressedSyllable, syllableList, syllabification, stressedIndex = returnList -print searchWord -print anotherPhoneList -print syllableList # We can see the first syllable was elided +print(searchWord) +print(anotherPhoneList) +print(syllableList) # We can see the first syllable was elided