Possible to publish tkinter web app on the internet?

403 views Asked by At

I made a weather web application using tkinter library. However whenever i am trying to publish it on github pages or other web hosts, it get 404 error.

I tried pythonanywhere by anaconda as well and still couldn’t publish my application

2

There are 2 answers

0
Bryan Oakley On BEST ANSWER

No, tkinter isn't designed to work on a website. With a tremendous amount of engineering it might be possible, or by using third party websites*. At its core, though, tkinter requires a display, not a browser.

* repl.it makes it possible to run tkinter code, though I don't think it's suitable for making apps. It's good for experimentation, though. I've seen one or two other solutions for running tk on the web, but they are very specialized and generally don't let you create apps that work like a traditional.

0
user9183668 On

You could try CloudTk. This will run an X11 app (like Tkinter) on a Linux host running VNC and display it via noVNC in a web browser. Check out CloudTk at https://wiki.tcl-lang.org/page/CloudTk and for examples of Tcl/Tk apps (which could be any X11 app as all the examples are run in Docker Containers) go to https://wiki.tcl-lang.org/page/Showcase