🧑💻 Python scripts cleanup, improve (#27533)
This commit is contained in:
@@ -2,14 +2,9 @@
|
||||
# MarlinBinaryProtocol.py
|
||||
# Supporting Firmware upload via USB/Serial, saving to the attached media.
|
||||
#
|
||||
import serial
|
||||
import math
|
||||
import time
|
||||
import serial, math, time, threading, sys, datetime, random
|
||||
from collections import deque
|
||||
import threading
|
||||
import sys
|
||||
import datetime
|
||||
import random
|
||||
|
||||
try:
|
||||
import heatshrink2 as heatshrink
|
||||
heatshrink_exists = True
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import division
|
||||
from __future__ import print_function, division
|
||||
|
||||
""" Generate the stepper delay lookup table for Marlin firmware. """
|
||||
|
||||
|
||||
@@ -18,8 +18,7 @@ Options:
|
||||
--num-temps=... the number of temperature points to calculate (default: 36)
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import division
|
||||
from __future__ import print_function, division
|
||||
|
||||
from math import *
|
||||
import sys, getopt
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
#
|
||||
# Usage: rle16_compress_cpp_image_data.py INPUT_FILE.cpp OUTPUT_FILE.cpp
|
||||
#
|
||||
import sys, struct
|
||||
import re
|
||||
import sys, struct, re
|
||||
|
||||
def addCompressedData(input_file, output_file):
|
||||
ofile = open(output_file, 'wt')
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
#
|
||||
# Usage: rle_compress_bitmap.py INPUT_FILE OUTPUT_FILE
|
||||
#
|
||||
import sys, struct
|
||||
import re
|
||||
import sys, struct, re
|
||||
|
||||
def addCompressedData(input_file, output_file):
|
||||
input_lines = input_file.readlines()
|
||||
|
||||
Reference in New Issue
Block a user