v023 printdata update

Firmware-Binaries
ThomasToka 6 months ago committed by GitHub
parent bee0d2cb3a
commit 7ba7278fc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -14,7 +14,7 @@ from io import BytesIO
def main(source_file):
# Read the entire G-code file into memory
with open(source_file, "r") as f:
with open(source_file, "r", encoding='utf-8') as f:
lines = f.readlines()
# Remove any empty lines and lines that are just a semicolon
@ -122,7 +122,7 @@ def main(source_file):
lines = [line for line in lines if line.strip() and not line.startswith('; generated by PrusaSlicer')]
# Write the modified content back to the original file
with open(source_file, "w") as f:
with open(source_file, "w", encoding='utf-8') as f:
f.writelines(lines)
if __name__ == "__main__":

Loading…
Cancel
Save