blob: 934dc83ac117078b5f345fcd972b7d8efd98c50e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
from gondul import _match_switches
from gondul import _sort_switches
def read_planning_switches(path, match=None):
lines = None
with open(path) as f:
lines = f.readlines()
switches = []
for line in lines:
switches.append(line.split(" ")[0])
switches = _match_switches(switches, match=match)
return _sort_switches(switches)
|