Extra space in front of line 25 was causing example problem to not work. The code would read in the line as input, then fail with the following:
Traceback (most recent call last):
File "optimise.py", line 21, in
t.load_tpd_file(argv[1])
File "/usr/local/lib/python2.7/dist-packages/topy/topology.py", line 82, in load_tpd_file
self.topydict = tpd_file2dict(fname)
File "/usr/local/lib/python2.7/dist-packages/topy/parser.py", line 89, in tpd_file2dict
d = _parsev2007file(s)
File "/usr/local/lib/python2.7/dist-packages/topy/parser.py", line 123, in _parsev2007file
d[pair[0].strip()] = pair[1].strip()
IndexError: list index out of range
Extra space in front of line 25 was causing example problem to not work. The code would read in the line as input, then fail with the following:
Traceback (most recent call last): File "optimise.py", line 21, in
t.load_tpd_file(argv[1])
File "/usr/local/lib/python2.7/dist-packages/topy/topology.py", line 82, in load_tpd_file
self.topydict = tpd_file2dict(fname)
File "/usr/local/lib/python2.7/dist-packages/topy/parser.py", line 89, in tpd_file2dict
d = _parsev2007file(s)
File "/usr/local/lib/python2.7/dist-packages/topy/parser.py", line 123, in _parsev2007file
d[pair[0].strip()] = pair[1].strip()
IndexError: list index out of range
Removing the space allows the example to run