class_docstr: A pyglet window with an event loop which executes automatically
  in a separate thread. Behavior is added by creating a subclass
  which overrides setup, update, and/or draw.
class_docstr_tok: ["A","pyglet","window","with","an","event","loop","which","executes","automatically","in","a","separate","thread",".","Behavior","is","added","by","creating","a","subclass","which","overrides","setup",",","update",",","and\/or","draw","."]
docstr: It is best not to override this function in the child
  class, unless you need to take additional arguments.
  Do any OpenGL initialization calls in setup().
docstr_tok: ["It","is","best","not","to","override","this","function","in","the","child","class",",","unless","you","need","to","take","additional","arguments",".","Do","any","OpenGL","initialization","calls","in","setup","(",")","."]
code: def __init__(self, **win_args):
      """
      It is best not to override this function in the child
      class, unless you need to take additional arguments.
      Do any OpenGL initialization calls in setup().
      """
  
      # check if this is run from the doctester
      if win_args.get("runfromdoctester", False):
          return
  
      self.win_args = dict(self.default_win_args, **win_args)
      self.Thread = Thread(target=self.__event_loop__)
      self.Thread.start()
  
file_path: sympy/sympy/plotting/pygletplot/managed_window.py
imports: from pyglet.window import Window
  from pyglet.clock import Clock
  from threading import Thread, Lock
label_desc: Use image node_id 1 to create a new ManagedWindow object from inherited base classes: Window with example: obj = ManagedWindow()