开发者

update a currently displayed variable

开发者 https://www.devze.com 2023-02-07 05:20 出处:网络
I am writing some Python code, which will in the end will display something which looks like: Volt1:3.1V

I am writing some Python code, which will in the end will display something which looks like:

Volt1:  3.1V  
Volt2:  2.6V  
Volt3:  5.6V  

I am constantly monitorin开发者_C百科g some register values which will give me the current values of Volt1,Volt2,Volt3. As I read in the new values I want to update the field next to the variable name (i.e 3.1V becomes 3.12V), but without just simply printing a new line, but updated the old value.

I am just not sure how to do it, can someone point me in the right direction?

Thanks


This kind of thing is best handled using a library such as curses.

0

精彩评论

暂无评论...
验证码 换一张
取 消