Alternative close window without sys.exit()

Hi,

I need to close the window from Panda3d, without the sys.exit() command. This is because I run an tkinter window as a startup window for changing the game settings and selecting a level.

The tkinter window opens and from there the game is started. But with sys.exit fired from the game, the whole application is closed. How can I avoid this, so the tkinter window remains open after the game window has closed?

Thanks,
Stefan

You can close the window with base.closeWindow(base.win).

David

Works :slight_smile:, thnx!

The window is closed and the tkinter is still open. But, there is another problem. The following is still running in the background, and the tkinter freezes:

Known pipe types:
glxGraphicsPipe
(all display modules loaded.)

I also tried both:
base.graphicsEngine.removeWindow(base.win)
base.graphicsEngine.removeAllWindows()

But, still the tkinter freezes up. :frowning:

Hmm, I don’t know.