def __init__(self): self.window_manager = WindowManager() self.state = { 'muted': False, 'connectivity': False } self.audio_manager = AudioManager(self.state)
def __init__(self): """ initialization """ if len(sys.argv) <= 1: print("Usage: typhon.py filename") exit(255) filename = sys.argv[1] if not os.path.isfile(filename): print("File '" + filename + "' not found") exit(254) self._windowManager = WindowManager('Typhon', self.on_keypress) self._captureManager = CaptureManager(cv2.VideoCapture(filename), self._windowManager) self.current_frame = None self._draw_info = True self._draw_help = False self.paused = True self._ocr = False
def clone(self): WindowManager().create(self.current_window.config)
import tkinter as tk from windowmanager import WindowManager root = tk.Tk() # root.withdraw() # initialise WindowManager win_man = WindowManager(root) # Create a new window win_man.new_window("testpopup") # Adding items to new window testwindow = win_man.window_dict["testpopup"][1] button = tk.Button(testwindow, text="test text here", command=lambda c="testpopup": win_man.close_window(c)) button.pack() root.mainloop()