(path)
| 35 | return result |
| 36 | |
| 37 | def load_towns(path): |
| 38 | result = [] |
| 39 | if not os.path.isfile(path): |
| 40 | print("WARNING! File with towns not found!") |
| 41 | return result |
| 42 | with open(path, "r") as f: |
| 43 | for line in f: |
| 44 | data = line.split(";") |
| 45 | isCapital = (data[3][0] == "t") |
| 46 | result.append((float(data[0]), float(data[1]), isCapital)) |
| 47 | return result |
| 48 | |
| 49 | def parallel_worker(tasks, capitals_list, towns_list): |
| 50 | while True: |