Syht / StochPong

1 stars 0 forks source link

clean exit #9

Closed laurentperrinet closed 7 years ago

laurentperrinet commented 7 years ago

when one quits the console returns

---------------------------------------------------------------------------
error                                     Traceback (most recent call last)
/Users/laurentperrinet/research/StochPong/stochastic_breakout.py in <module>()
    458         TRACK_EYE = False
    459
--> 460 if __name__ == '__main__': main_menu()

/Users/laurentperrinet/research/StochPong/stochastic_breakout.py in main_menu()
    322                 pygame.quit()
    323
--> 324         screen.fill((0,0,0))
    325         menu.draw(screen)
    326         screen.blit(titletext, titletextrect)

error: display Surface quit

any way to have a smoother exit?

Syht commented 7 years ago

I managed to have a clean exit using os._exit() ! I close the thread.