Py学习  »  Python

将python日历插入tkinter标签

jim leahy • 4 年前 • 551 次点击  

我写的代码有问题。当我插入变量时 calendar2019 进入Tkinter标签 LabelCalen 它不会出现在窗口 root4 ,和窗口 根4 一点都没有。

import calendar
import tkinter as tk

def CalScr():
    calendar2019 = calendar.calendar(2019)#creating calender variable
    root4 = tk.Tk()
    labelCalen= tk.Label(root4, text = calendar2019, )
    root4.mainloop
CalScr()

压延机应该印在标签上 拉贝尔

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/44042
 
551 次点击  
文章 [ 1 ]  |  最新文章 4 年前