Mercurial > repos > peterjc > effectivet3
comparison tools/effectiveT3/effectiveT3.py @ 8:4a0aa59062f7 draft
Uploaded v0.0.11, take 9, debug output if can't find model
| author | peterjc |
|---|---|
| date | Fri, 10 May 2013 11:32:29 -0400 |
| parents | 66e9d4c44ca2 |
| children | b863c4bec840 |
comparison
equal
deleted
inserted
replaced
| 7:c70df461aae5 | 8:4a0aa59062f7 |
|---|---|
| 88 stop_err("Return code %i from command:\n%s\n\n%s\n\n%s" % (return_code, err, stdout, stderr)) | 88 stop_err("Return code %i from command:\n%s\n\n%s\n\n%s" % (return_code, err, stdout, stderr)) |
| 89 else: | 89 else: |
| 90 stop_err("Return code %i from command:\n%s\n%s" % (return_code, err, stderr)) | 90 stop_err("Return code %i from command:\n%s\n%s" % (return_code, err, stderr)) |
| 91 | 91 |
| 92 if not os.path.isdir(effectiveT3_dir): | 92 if not os.path.isdir(effectiveT3_dir): |
| 93 stop_err("Effective T3 folder not found: %s" % effectiveT3_dir) | 93 stop_err("Effective T3 folder not found: %r" % effectiveT3_dir) |
| 94 | 94 |
| 95 if not os.path.isfile(effectiveT3_jar): | 95 if not os.path.isfile(effectiveT3_jar): |
| 96 stop_err("Effective T3 JAR file not found: %s" % effectiveT3_jar) | 96 stop_err("Effective T3 JAR file not found: %r" % effectiveT3_jar) |
| 97 | 97 |
| 98 effectiveT3_model = os.path.join(effectiveT3_dir, "module", model) | 98 effectiveT3_model = os.path.join(effectiveT3_dir, "module", model) |
| 99 if not os.path.isfile(effectiveT3_model): | 99 if not os.path.isfile(effectiveT3_model): |
| 100 stop_err("Effective T3 model JAR file not found: %s" % effectiveT3_model) | 100 sys.stderr.write("Contents of %r is %s\n" |
| 101 % (os.path.join(effectiveT3_dir, "module"), | |
| 102 ", ".join(repr(p) for p in os.listdir(os.path.join(effectiveT3_dir, "module"))))) | |
| 103 sys.stderr.write("Main JAR was found: %r\n" % effectiveT3_jar) | |
| 104 stop_err("Effective T3 model JAR file not found: %r" % effectiveT3_model) | |
| 101 | 105 |
| 102 #We will have write access whereever the output should be, | 106 #We will have write access whereever the output should be, |
| 103 temp_file = os.path.abspath(tabular_file + ".tmp") | 107 temp_file = os.path.abspath(tabular_file + ".tmp") |
| 104 | 108 |
| 105 #Use absolute paths since will change current directory... | 109 #Use absolute paths since will change current directory... |
