(inputFile, outputFile)
| 59 | return script |
| 60 | |
| 61 | def main(inputFile, outputFile): |
| 62 | if not os.path.isfile(inputFile): |
| 63 | print("ERROR: the provided input file '%s' is not a regular file" % inputFile) |
| 64 | sys.exit(1) |
| 65 | |
| 66 | script = convert(inputFile) |
| 67 | |
| 68 | if outputFile: |
| 69 | fpOut = open(outputFile, "w") |
| 70 | sys.stdout = fpOut |
| 71 | sys.stdout.write(script) |
| 72 | sys.stdout.close() |
| 73 | else: |
| 74 | print(script) |
| 75 | |
| 76 | if __name__ == "__main__": |
| 77 | usage = "%s -i <input file> [-o <output file>]" % sys.argv[0] |
no test coverage detected
searching dependent graphs…