91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 2.04KB
    文件類型: .py
    金幣: 1
    下載: 0 次
    發布日期: 2024-05-06
  • 語言: Python
  • 標簽: python??

資源簡介

python實現的日歷

資源截圖

代碼片段和文件信息

#?-*-?coding:UTF-8?-*-
from?Tkinter?import?*


class?Calendar(frame):
????def?__init__(self?master):
????????frame.__init__(self?master)
????????self.day_button?=?[]
????????self.day_control?=?[]
????????for?weeks?in?range(len([‘周一‘?‘周二‘?‘周三‘?‘周四‘?‘周五‘?‘周六‘?‘周日‘])):
????????????Label(self?text=[‘周一‘?‘周二‘?‘周三‘?‘周四‘?‘周五‘?‘周六‘?‘周日‘][weeks]).grid(row=0?column=weeks)
????????for?i?in?range(42):
????????????self.day_control.append(StringVar())
????????????self.day_button.append(Button(self?textvariable=self.day_control[i]))

????def?display(self?time):
????????for?every_control?in?self.day_control:
????????????every_control.set(‘‘)
????????day_tuple?=?[31?28?31?30?31?30?31?31?30?31?30?31]
????????year?=?int(time[:4])
????????month?=?int(time[5:7])
????????if?(year?%?4?==?0?and?year?%?100?!=?0)?or?year?%?400?==?0:
????????????day_tuple[1]?+=?1
????????co?=?first_day(time)?-?1
????????ro?=?1
????????order?=?co
????????for?j?in?range(1?day_tuple[month?-

評論

共有 條評論