MCPcopy Create free account
hub / github.com/comaps/comaps / load_towns

Function load_towns

tools/python/road_runner.py:37–47  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

35 return result
36
37def 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
49def parallel_worker(tasks, capitals_list, towns_list):
50 while True:

Callers 1

road_runner.pyFile · 0.85

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected