如何获取 android 上 python 的时间?

How to get the time in python on android?

我正在尝试制作一个程序来使用时间并将其显示到秒。我该怎么做呢? 到目前为止,我已经找到了 get_time() 函数,它是 kivy 的一部分,但我不确定如何使用它。我已经导入了所有内容,但它仍然显示 "not defined".

import datetime
datetime.datetime.now()

应该适用于任何 python 框架。

您可以使用 Documentation 了解更多详情。