npyscreen具有用于选择日期的小部件"DateCombo" and "TitleDateCombo"。在
乌尔韦德有什么相似之处吗? 如果没有,是否有推荐的第三方库?在
下面是一个使用npyscreen的示例:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
import npyscreen
class DateForm(npyscreen.Form):
def afterEditing(self):
self.parentApp.setNextForm(None)
def create(self):
self.date = self.add(npyscreen.TitleDateCombo, name="Date")
class TestApplication(npyscreen.NPSAppManaged):
def onStart(self):
new_user = self.addForm("MAIN", DateForm, name="Read Date")
if __name__ == "__main__":
TestApplication().run()
python库^{} 似乎没有包含日期选择器(stateof2018)。所以我写了一篇(初步的)文章。在
这个类叫做^{} ,并且可以通过pip安装。在
有关说明小部件功能的独立示例,请参见here。在
如需更多(更简单)的示例,请参阅here。在
有关参数和选项的详细说明,请参见the corresponding github wiki entry。在
一些例子
最小
今天不是
^{pr2}$ISO-8601+样式+紧凑型
不,urwid没有日期选择器,它是一个复杂的小部件,需要自己的项目来实现,因为这些小部件通常需要考虑日期格式、区域设置等
我不知道任何实现它的urwid库,并且通过快速扫描我知道的库也找不到。在
您可以尝试购买一个库,但您可能会有更好的运气实现一个自己的具体需要。在
相关问题 更多 >
编程相关推荐