(BATfile)
| 440 | return condCmd |
| 441 | |
| 442 | def readBATFile(BATfile): |
| 443 | batIndex = [0] |
| 444 | batLabels = {} |
| 445 | batLineNo = 0 |
| 446 | for batLine in BATfile: |
| 447 | batIndex.append(batIndex[batLineNo]+len(batLine)) |
| 448 | batLineNo += 1 |
| 449 | if batLine.strip()[:1] == ":" and len(batLine.strip().split(" ")[0]) > 1: |
| 450 | batLabels[batLine.strip().split(" ")[0][1:]] = [batLineNo,batIndex[batLineNo]] |
| 451 | BATfile.seek(0) |
| 452 | del batIndex,batLineNo |
| 453 | |
| 454 | return batLabels |
| 455 | |
| 456 | batEcho = True |
| 457 | cmd = "" |