每次我运行程序时,窗口都不会弹出。它只是在运行后超时。 我的代码如下:
#Made by nullfact0r (I'd do this better but I'm trying to get this done in under a week)
#Copyright 2019
#Imports
import sys
import os
import urllib.request
import tkinter as tk
from tkinterhtml import HtmlFrame
#Functions
def main():
root = tk.Tk()
frame = HtmlFrame(root,horizontal_scrollbar="auto")
frame.grid(sticky=tk.NSEW)
#frame.set_content(urllib.request.urlopen("").read().decode())
frame.set_content(open("index.html","r").read())
root.columnconfigure(0,weight=1)
root.rowconfigure(0,weight=1)
root.mainloop()
#Main
if __name__ == "__main__":
main()
目前没有回答
相关问题 更多 >
编程相关推荐