Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a clear_cell_output command? #53

Open
jondufault opened this issue May 10, 2023 · 0 comments
Open

Adding a clear_cell_output command? #53

jondufault opened this issue May 10, 2023 · 0 comments

Comments

@jondufault
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant