Browse Source

Reinstate the argument input

Otherwise I can't use it without creating a user 'lfei' or something.

Contributes to issue CURA-5561.
Ghostkeeper 6 years ago
parent
commit
842ee7c00e
1 changed files with 7 additions and 8 deletions
  1. 7 8
      50_inst_per_sec.py

+ 7 - 8
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: <input gcode> <output gcode>")
-    #    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"
+    if len(sys.argv) != 3:
+        print("Usage: <input gcode> <output gcode>")
+        sys.exit(1)
+    in_filename = sys.argv[1]
+    out_filename = sys.argv[2]
+
     with open(in_filename, "r", encoding = "utf-8") as f:
         all_lines = f.readlines()