Advertisement
Uno-Dan

Untitled

Oct 28th, 2018
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. class App(object):
  2.     instance = None
  3.  
  4.     def __new__(cls, **kwargs):
  5.         if not cls.instance:
  6.             cls.instance = super(App, cls).__new__(cls)
  7.             cls.instance.admin = _Admin(**kwargs)
  8.  
  9.         return cls.instance
  10.  
  11.     def mainloop(self):
  12.         self.instance.admin.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement