diff --git a/inc/Node.h b/inc/Node.h index 588c20f0e4abefa104c8c18cee94bb39479c7c41..4f65bcf1d8b9d0cf1b6aec06c66bf977052283c8 100644 --- a/inc/Node.h +++ b/inc/Node.h @@ -37,7 +37,7 @@ using namespace std; #define PORT "2000" #define LOGGING_FILE_NAME "logs.txt" -#define EXEC_CMD "./" //python for python script, ./ for an executable +#define EXEC_CMD "python " //python for python script, ./ for an executable // --- parameters (stay tuned) --- #define T_period 150000 // in microseconds diff --git a/map1.py b/map1.py index 83b8e33a4c28367c0295ce26b421f5f7294bf9d5..a7c7cefe9460d815b72c3db3a5177a521c4dacb8 100644 --- a/map1.py +++ b/map1.py @@ -12,6 +12,7 @@ def map1(vote_str): else: ret = vote[j] + ">" + vote[i] + ",0" print(ret) - test_ret += ret - test_ret += '\n' - return test_ret +with open(sys.argv[1]) as f: + lines = f.readlines() +for l in lines: + map1(l)