Reinstate the argument input

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

Contributes to issue CURA-5561.
This commit is contained in:
Ghostkeeper 2018-08-31 16:29:50 +02:00
parent 43a8894c64
commit 842ee7c00e
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A

View file

@ -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]
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"
with open(in_filename, "r", encoding = "utf-8") as f:
all_lines = f.readlines()