From 842ee7c00e8af1174a5f0973fd6181754c21dea1 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 31 Aug 2018 16:29:50 +0200 Subject: [PATCH] Reinstate the argument input Otherwise I can't use it without creating a user 'lfei' or something. Contributes to issue CURA-5561. --- 50_inst_per_sec.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/50_inst_per_sec.py b/50_inst_per_sec.py index 5c8a23d7fd..b9be532595 100644 --- a/50_inst_per_sec.py +++ b/50_inst_per_sec.py @@ -4,6 +4,7 @@ import copy import math import os +import sys import random from typing import Dict, List, Optional, Tuple @@ -375,14 +376,12 @@ class CommandBuffer: if __name__ == "__main__": - #if len(sys.argv) != 3: - # print("Usage: ") - # sys.exit(1) - #in_filename = sys.argv[1] - #out_filename = sys.argv[2] + if len(sys.argv) != 3: + print("Usage: ") + sys.exit(1) + in_filename = sys.argv[1] + out_filename = sys.argv[2] - in_filename = "/home/lfei/UM3_elephant_pendant_2.gcode" - out_filename = "/home/lfei/UM3_elephant_pendant_2-annotated.gcode" with open(in_filename, "r", encoding = "utf-8") as f: all_lines = f.readlines()