Tkinter on Haiku?

Is it possible to use tkinter?

1 Like

Hi! Welcome!

Sadly, tkinter dead-locks when you try to use it, see: https://github.com/haikuports/haikuports/issues/6967.

Somewhere between Python → tkinter → tk / tcl → SDL (our libtk port relies on SDL, see https://www.androwish.org) things go wrong, and no one has figured it out just yet.

1 Like

Unfortunately no. Tcl/Tk on Haiku is based on UndroidWish, which doesn’t get along with whatever wizardry Tkinter does in the background and… yeah, see above. But Tcl/Tk itself works fine, if that helps. It’s just ugly. Edit: also, nowadays there are other bindings available such as PyQT5.

1 Like

An interesting alternatives:

2 Likes

interesting, I’ll take a look

On that vein, there’s also Remi, and PySimpleGUI. Albeit I haven’t tried them yet on Haiku.

2 Likes

It would be possible if Xlibe supported Tk, which unfortunately it doesn’t. I was just looking into this again yesterday, and it seems the problem might be a missing API in Haiku itself. There might be a way to work around this inside Tk, but I didn’t dig into that just yet.

2 Likes

So, what is the best way now learn programming “python with Haiku”?
Try all this GUIs? To find out it does not work out?

Would be nice a professional python-programmer would look into this and recommend a successful way to use learn python with Haiku.

Self-promotion here, but why not try Haiku-PyAPI?
If there are widgets you need bound, you can always ask me.

2 Likes