如果我在tkinter窗口中有以下代码:
import tkinter
from tkinter import *
def close_window():
window.destroy()
exit()
def main_fun():
global exit_button, window, output, x_ref, v
window = tkinter.Tk()
window.geometry("400x200") # Width x Height
v = IntVar()
output = Text(window, width=40, height=5, wrap=WORD, background="white")
output.grid(row=5, column=0, columnspan=2, sticky=W)
submit_button = Button(window, text="SUBMIT", width=6,
command="")
submit_button.grid(row=3, column=0, sticky=W)
x_ref = 13
exit_button = Button(window, text="Exit", width=14, command=close_window)
exit_button.grid(row=x_ref, column=0, sticky=W)
window.mainloop()
main_fun()
如何将整个tkinter窗口嵌入到html页面中,以便当我执行python脚本时,tkinter窗口显示嵌入浏览器中?