I adore this package. I was wondering if there's a proper way to clear the output of a cell while it's running. I'm doing some tuning/calibration for a sensor and want the output on a cell to print out realtime values for the sensor (overwriting the value)
Currently I'm using this hack by modifying kernel.py and having my code do print("CLEAR_OUTPUT") and then print(sensor_val)
def sres(self, output, asciigraphicscode=None, n04count=0, clear_output=False):
if "CLEAR_OUTPUT" in output:
output = None
clear_output = True
I'm new to micropython so I don't know if there's some function I'm missing that's obvious and new to this package too. I tried from upysh import clear and using that but it didn't do anything. Trying to get up to speed.
I adore this package. I was wondering if there's a proper way to clear the output of a cell while it's running. I'm doing some tuning/calibration for a sensor and want the output on a cell to print out realtime values for the sensor (overwriting the value)
Currently I'm using this hack by modifying kernel.py and having my code do
print("CLEAR_OUTPUT")and thenprint(sensor_val)I'm new to micropython so I don't know if there's some function I'm missing that's obvious and new to this package too. I tried
from upysh import clearand using that but it didn't do anything. Trying to get up to speed.