def ToggleInteractiveWindow():
 if (edit is None):
  CreateInteractiveWindow()
 elif edit.NeedRecreateWindow():
  edit.RecreateWindow()
 else:
  CloseInteractiveWindow()

def ToggleInteractiveWindow ( ) : if ( edit is None ) : CreateInteractiveWindow ( ) elif edit . NeedRecreateWindow ( ) : edit . RecreateWindow ( ) else : CloseInteractiveWindow ( )
if the interactive window is visible .