Advertisement
Uno-Dan

Untitled

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