|
|
|
@ -18,8 +18,9 @@ if len(sys.argv) < 4:
|
|
|
|
|
|
|
|
|
|
fn_in = sys.argv[1]
|
|
|
|
|
fn_out = sys.argv[2]
|
|
|
|
|
if fn_in == fn_out:
|
|
|
|
|
print("Input and output filenames are identical. Refusing to run, to avoid accidental lose.")
|
|
|
|
|
#if fn_in == fn_out:
|
|
|
|
|
# print("Input and output filenames are identical. Refusing to run, to avoid accidental lose.")
|
|
|
|
|
# exit()
|
|
|
|
|
|
|
|
|
|
print("Reading '%s'..." % (fn_in, ))
|
|
|
|
|
fh_in = open(fn_in, "rb")
|
|
|
|
@ -68,7 +69,8 @@ while arg_i < len(sys.argv):
|
|
|
|
|
|
|
|
|
|
print()
|
|
|
|
|
print("Writing '%s'..." % (fn_out, ))
|
|
|
|
|
data = geo.saveToData()
|
|
|
|
|
fh_out = open(fn_out, "wb")
|
|
|
|
|
geo.saveToFile(fh_out)
|
|
|
|
|
fh_out.write(data)
|
|
|
|
|
fh_out.close()
|
|
|
|
|
print("Done.")
|
|
|
|
|