1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
---
scripts/sphinxtrain | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
--- a/scripts/sphinxtrain
+++ b/scripts/sphinxtrain
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from __future__ import print_function
commit 1c732eb2e0a5cf3ddb1b4c31527b39820cf192c2
Author: nshmyrev <nshmyrev@94700074-3cef-4d97-a70e-9c8c206c02f5>
Date: Mon Sep 26 20:31:01 2016 +0000
Replace tabs with spaces, enables python3
git-svn-id: svn+ssh://svn.code.sf.net/p/cmusphinx/code/trunk/sphinxtrain@13244 94700074-3cef-4d97-a70e-9c8c206c02f5
diff --git a/scripts/sphinxtrain b/scripts/sphinxtrain
index 3ed59a5..fec5375 100644
--- a/scripts/sphinxtrain
+++ b/scripts/sphinxtrain
@@ -94,7 +94,7 @@ def run_stages(stages):
if name == stage:
ret = os.system(sphinxpath + "/scripts/" + step)
if ret != 0:
- exit(ret)
+ exit(ret)
def run_from(stage):
found = False
@@ -109,9 +109,9 @@ def run_from(stage):
def run():
print("Running the training")
for step in steps:
- ret = os.system(sphinxpath + "/scripts/" + step)
- if ret != 0:
- exit(ret)
+ ret = os.system(sphinxpath + "/scripts/" + step)
+ if ret != 0:
+ exit(ret)
def usage():
print ("")
commit 09ea4d552376d2eed7ae1e5d3ab1f28ded2882c3
Author: nshmyrev <nshmyrev@94700074-3cef-4d97-a70e-9c8c206c02f5>
Date: Mon Sep 26 21:15:21 2016 +0000
More python3 compatibility
git-svn-id: svn+ssh://svn.code.sf.net/p/cmusphinx/code/trunk/sphinxtrain@13245 94700074-3cef-4d97-a70e-9c8c206c02f5
diff --git a/scripts/sphinxtrain b/scripts/sphinxtrain
index fec5375..6b39d69 100644
--- a/scripts/sphinxtrain
+++ b/scripts/sphinxtrain
@@ -130,7 +130,7 @@ def main():
try:
opts, args = getopt.getopt(sys.argv[1:], "ht:s:f:", ["help", "task", "stages", "from"])
- except getopt.GetoptError, err:
+ except getopt.GetoptError as err:
print(str(err))
usage()
sys.exit(-1)
|