我在为骰子模拟器创建按钮时在 jupyter notebook 中遇到 TCL 错误

问题描述 投票:0回答:0
import random 

# Creating a window 
window = Tk() 

# Setting background colour of the window 
window.configure(bg="black") 

# Setting geometry of the window 
window.geometry("550x350") 

# Setting title of the window 
window.title("Rolling The Dices Game") 

# Preventing maximizing of the window 
window.resizable(0, 0) 

window.mainloop() 
roll_button = Button(window, text="Roll!", 
                     width=10, height=2, 
                     font=15, bg="aqua", bd=2)]

这里有什么问题

我试图使用 tkinter 库为骰子模拟器创建一个按钮,但最终出现错误

tkinter jupyter-notebook tcl
© www.soinside.com 2019 - 2024. All rights reserved.