mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
Fix particle sample and tkinter in Python 3
This commit is contained in:
parent
2abad9649b
commit
58837c0f4a
@ -204,7 +204,7 @@ class ParticleEffect(NodePath):
|
||||
|
||||
def loadConfig(self, filename):
|
||||
data = vfs.readFile(filename, 1)
|
||||
data = data.replace('\r', '')
|
||||
data = data.replace(b'\r', b'')
|
||||
try:
|
||||
exec(data)
|
||||
except:
|
||||
|
@ -2904,7 +2904,7 @@ class ShowBase(DirectObject.DirectObject):
|
||||
|
||||
# Use importlib to prevent this import from being picked up
|
||||
# by modulefinder when packaging an application.
|
||||
tkinter = importlib.import_module('Tkinter').tkinter
|
||||
tkinter = importlib.import_module('_tkinter')
|
||||
Pmw = importlib.import_module('Pmw')
|
||||
|
||||
# Create a new Tk root.
|
||||
@ -2938,7 +2938,7 @@ class ShowBase(DirectObject.DirectObject):
|
||||
# dooneevent will return 0 if there are no more events
|
||||
# waiting or 1 if there are still more.
|
||||
# DONT_WAIT tells tkinter not to block waiting for events
|
||||
while tkinter.dooneevent(tkinter.ALL_EVENTS | tkinter.DONT_WAIT):
|
||||
while self.tkRoot.dooneevent(tkinter.ALL_EVENTS | tkinter.DONT_WAIT):
|
||||
pass
|
||||
|
||||
return task.again
|
||||
|
Loading…
x
Reference in New Issue
Block a user