17 lines
480 B
Python
17 lines
480 B
Python
#!/usr/bin/python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import sys
|
|
from tsp import solve_it
|
|
|
|
if __name__ == '__main__':
|
|
import sys
|
|
if len(sys.argv) > 1:
|
|
file_location = sys.argv[1].strip()
|
|
with open(file_location, 'r') as input_data_file:
|
|
input_data = input_data_file.read()
|
|
print(solve_it(input_data))
|
|
else:
|
|
print('This test requires an input file. Please select one from the data directory. (i.e. python solver.py ./data/tsp_51_1)')
|
|
|