I need a gui system (multiplatform) to use with panda3d (for loading models, etc). I’m trying with wxPython but I’m getting this error when I try to run it:
:prc(warning): Invalid floating-point value for ConfigVariable simple-thread-epoch-timeslice: 0.05
Then I have to kill the process to close it.
Here is the code:
import wx
from direct.directbase import DirectStart
app = wx.App()
def handleWxEvents(task):
while app.Pending():
app.Dispatch()
return task.cont
taskMgr.add(handleWxEvents, 'handleWxEvents')
run()
It is from panda3d manual documentation.
Some one know haw to solve it?
Thanks
PD: When I run wxPython alone it works, and when I use panda3d alone it also works.
looks like the good old “wx stuff changes the interpretation of . and , again” error. i am not quite sure but you might get around it by importing the wx stuff after directstart. thought i really dont know for sure.
Thanks for replay. If I import first directStart and then wx I get the same error. I’m using panda3d 1.6.2 and wxpython 2.8.10 on ubuntu 9.10 amd64. I also try with panda3d 1.7.0 but I get the same error.
time ago I was eager as you to have a good GUI and thought was a good idea to use the WX stuff but now not anymore.
Anyhow the best working setup I was able to reach is what you find here - dig into e try to see if fits good for you.
It’s interesting, the code above is realy works, and even better (on first view) than Tut-Particle-Panel.py (standart example).
There are three questions:
In the code above (posted: Mon Jan 25, 2010 3:39 pm) Tkinter initialised twice: root = Tk() and by Panda3d in base.startTk() (via Pmw). But only one window with controls appears ? How is it ?
Tut-Particle-Panel.py crash when tk-window gets focus (mouse click), if code was running from the IDLE (python GUI). And works well standalone. What the problem with IDLE ?
What package is more perspective for Panda3D: Tkinter or wxPython?