Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get a Python Tkinter Applet to Web Page

Tags:

python

tkinter

I wrote an applet in Python using the Tkinter library. I finished writing the applet but now I want to make it public on my website. Does anyone know a way to get the python script to work on my website? I don't want it to have to be something that needs to be downloaded, but can just run in the browser if possible. Thanks!

like image 731
Mintaka Avatar asked Aug 10 '11 20:08

Mintaka


People also ask

Can Tkinter be run on Web?

No, we can't use Tkinter online, Tkinter is designed only for developing GUI.

Can you embed Tkinter in HTML?

The tkhtmlview module is a collection of Tkinter widgets whose text can be set in HTML format. An HTML widget isn't a web browser frame, it's only a simple and lightweight HTML parser that formats the tags used by the Tkinter Text base class.

Can I use HTML instead of Tkinter?

No, there is no good way to display html in a tkinter application.

Can you build an app in Tkinter?

Tkinter is a Python Package for creating GUI applications. Python has a lot of GUI frameworks, but Tkinter is the only framework that's built into the Python standard library. Tkinter has several strengths; it's cross-platform, so the same code works on Windows, macOS, and Linux.


1 Answers

What you ask is not possible. Several years ago there was a Tcl/Tk browser plugin, but the last time anyone touched that sourceforge project was back in 2006. I seriously doubt it could be made to work with tkinter. For that matter, I doubt it works for tcl/tk either. Browsers have advanced quite a bit since then.

And no, getting it to work in jython so you can run it via a java plugin won't help. Tkinter works by working directly with a tcl/tk interpreter. The tcl/tk interpreter won't run in the JVM.

like image 180
Bryan Oakley Avatar answered Oct 06 '22 05:10

Bryan Oakley