I am trying to develop an application in panda3D and i want to use tkinter for my interface. i can’t actually make these two interact… How can i make a tkinter program call some panda3d functions??
Anyone can help?


Panda has builtin support for Tk. You just have to place this in your Config.prc file:

want-tk #t

Alternatively, you can place this line after the DirectStart import:


This enables all that’s needed to have Tk and Panda run together seamlessly. Now, you can just create windows, buttons, etc.

Are you sure you want to use tkinter though? I found the interface and api rather ugly. wxPython is better – and Panda also has support for that.


Thx for the prompt response! Actually i thought about wxpython before…but isn’t it more difficult to code?
And if i do use it how do i integrate them?


If you want to use wxPython, you have to replace “want-tk” with “want-wx” (or [size=92]base.startTk()[/size] with [size=92]base.startWx()[/size])

After you’ve done that, you don’t have to create your own wx app anymore or run MainLoop(). You can just specify base.wxApp whenever you need to give an app somewhere.

Is there any example on it?

bump… I’m still scratching my head how to do this too…