在Python中更新时钟程序而不创建新行
- 论坛
- 在Python中更新时钟程序而不创建新行
8 浏览
在Python中更新时钟程序而不创建新行
我正在为树莓派创建一个程序,在命令行中,程序显示如下的日期和时间,我想添加重复或更新,以便程序启动后日期和时间为当前值。这段代码来自一个在线教程,我想尝试对它进行修改,但遇到了死胡同。我目前正在学习Python。
#!/usr/bin/python import time now = time.strftime("%c") print "current date and time " + time.strftime("%c")
admin 更改状态以发布 2023年5月22日