def get_current_canvas():
 cc = [c() for c in canvasses if (c() is not None)]
 if cc:
  return cc[(-1)]
 else:
  return None

def get_current_canvas ( ) : cc = [ c ( ) for c in canvasses if ( c ( ) is not None ) ] if cc : return cc [ ( - 1 ) ] else : return None
get the currently active canvas returns none if there is no canvas available .