Advertisement
RedstoneHair

Nuitka close freeze

May 20th, 2025
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.03 KB | None | 0 0
  1. import pygameextra as pe
  2.  
  3. pe.init()
  4.  
  5.  
  6. class GUI(pe.GameContext):
  7.     FPS = 60
  8.     AREA = (500, 500)
  9.     BACKGROUND = pe.colors.aliceblue
  10.  
  11.     def __init__(self):
  12.         super().__init__()
  13.         self.text = pe.Text("Hello World", colors=[pe.colors.black, None])
  14.         self.text.rect.center = (
  15.             self.width // 2,
  16.             self.height // 2,
  17.         )
  18.         self.running = True
  19.  
  20.     def quit_check(self):
  21.         super().quit_check()
  22.         self.running = False
  23.  
  24.     def loop(self):
  25.         self.text.display()
  26.  
  27.  
  28. if __name__ == "__main__":
  29.     gui = GUI()
  30.     while gui.running:
  31.         gui()
  32.     pe.pge_quit()
  33. # PYGAMEEXTRA_DIR=$(python3 -c 'import os, pygameextra; print(os.path.dirname(pygameextra.__file__))')
  34. # python3 -m nuitka --mode=app --output-dir=build --script-name=test_mac.py --include-data-dir=${PYGAMEEXTRA_DIR}/assets=pygameextra/assets --deployment
  35. ## Nuitka:   Version '2.7.3' on Python 3.13 (flavor 'Homebrew Python') commercial grade 'not installed'.
  36. ## MacOS 15 (Mac mini 2020 M1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement