Description: tkinter works beautifully under LibreOffice. It can be used in Linux without any problem (Linux LibreOffice uses system Python interpreter if LibreOffice is installed using packaging system like deb/rpm). But on Windows, Mac and LibreOffice installed in Linux using e.g. flatpak, LibreOffice has its own Python interpreter packaged. This interpreter is missing tkinter. Other Python packages can be added using pip but not tkinter. If tkinter is not a part of a Python interpreter, there is no way to add it later. Steps to Reproduce: 1. there is no way to add tkinter to LibreOffice Python interpreter Actual Results: tkinter works nicely but can not be added Expected Results: tkinter should be the default part of the packaged Python interpreter Reproducible: Always User Profile Reset: No Additional Info: It is very sad that there are very limited possibilities regarding GUI frameworks in Python in LibreOffice. Only UNO dialogs really work. Under Linux, tkinter works without problems but it can not be used on Windows/Mac/Linux with LO installed using flatpak. Also PyQT and PySide actually work very nicely! But after closing a PyQT window, LibreOffice always crashes (new versions of LO. In older versions of LO, PyQT/PySide just worked). Many other GUI frameworks do not work under LibreOffice (I tested Dear PyGUI, Toga, PySimpleGUI, wxPython, Kivy, Pywebview). It is interesting that many of them actually work but only after closing a window, the whole LibreOffice freezes or crashes or the window can not be closed (destroy method does not work). So, there are really no options, just UNO dialog windows and forms which are unknown to almost all Pythonists.
I think it's an enhancement, but not a bug Would be interesting to know why LO's python has no tkinter from the box... Andreas, Alain, maybe you have some opinion here?
Taichi, may be you have some opinion here (I asked because you added bz2 module to our internal Python)
It is definitely an enhancement request, instead of a bug. tkinter is not natively linked to UNO API, whereas the Basic dialog editor is. Python editors are not - easily - linked to LibreOffice either. I foresee a limited community of coders that may be interested in such enhancements. Workaround for : - LibreOffice embedded Python path can be added to native Python path in order to benefit from UNO API if need be. - Native Python path can be prepended to LibreOffice Python path to benefit from tkinter. However such setups may hardly benefit to standard - that is non-scripters - users unless some automated startup would accompany tkinter-dependant apps inside LibreOffice.
Hi, I am just a member of the "limited comunity of coders". Actually, I think that the whole Python scripting in LO is something that is only used by a limited community of coders. But whenever I see anyone coding in Python in LO and they need to add any GUI, they look for tkinter. And no wonder, because it is super easy to use and is a part of every standard Python installation (but not in LO). Here someone was asking this in 2010: https://forum.openoffice.org/en/forum/viewtopic.php?t=31426 Here is an issue from 2004 already mentioning this: https://bz.apache.org/ooo/show_bug.cgi?id=30349 Not having tkinter could deterr some Python devs because it is not so easy to create a UNO dialog with listeners etc. comparing to tkinter which is immediately known to Pythonists.
Comment from external/python3/ExternalPackage_python3.mk -> # idlelib, tkinter, turtledemo - need Tk to build the C module
I guess we can move this to NEW