0

Every time I run my program, the window doesn't pop up. It just times out after being run. My code is down below:

#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()
  • don't you get any error message when you run it in console/terminal/cmd.exe ? – furas Jan 21 '20 at 13:12
  • it seems `tkinterhtml` is old and maybe try cefpython - [Why can't run both tkinter mainloop and cefpython3 messageloop?](https://stackoverflow.com/questions/57974532/why-cant-run-both-tkinter-mainloop-and-cefpython3-messageloop) – furas Jan 21 '20 at 13:24
  • @furas no error message at all – the meme factory Jan 21 '20 at 15:40
  • when I try to run it then I see `_tkinter.TclError: invalid command name "html"` and can't change it. I would rather use `cefpython` which uses Chrome Engine and for sure it can runs JavaScript and CSS. HTML modules for tkinter which I saw before could display only HTML but not CSS and couldn't run JavaScript. – furas Jan 22 '20 at 00:55

0 Answers0