__init__.py 866 B

1234567891011121314151617181920212223242526272829303132333435
  1. # -*- coding: utf-8 -*-
  2. import os
  3. import pygame
  4. #import math
  5. #mport subprocess
  6. import platform
  7. #from beeprint import pp
  8. from libs.roundrects import aa_round_rect
  9. ## local UI import
  10. from UI.lang_manager import MyLangManager
  11. class APIOBJ(object):
  12. _Page = None
  13. def __init__(self):
  14. pass
  15. def Init(self,main_screen):
  16. pass
  17. def API(self,main_screen):
  18. if main_screen !=None:
  19. main_screen._MsgBox.SetText("Rebooting to LauncherGo")
  20. main_screen._MsgBox.Draw()
  21. main_screen.SwapAndShow()
  22. pygame.time.delay(300)
  23. if "arm" in platform.machine():
  24. os.system("sed -i s/launcher/launchergo/g ~/.bashrc" )
  25. os.system("sudo reboot")
  26. OBJ = APIOBJ()
  27. def Init(main_screen):
  28. OBJ.Init(main_screen)
  29. def API(main_screen):
  30. OBJ.API(main_screen)