parameters: (fname="canvases_list.js")
docstring: Use CANVASES_LIST_TEMPLATE as a template to create a canvases list include for the browser.
         Write out only those canvases which have existing filename.png plots.
docstring_summary: Use CANVASES_LIST_TEMPLATE as a template to create a canvases list include for the browser.
         Write out only those canvases which have existing filename.png plots.
docstring_tokens: Use CANVASES_LIST_TEMPLATE as a template to create a canvases list include for the browser . Write out only those canvases which have existing filename . png plots .
function: def createCanvasesList(fname="canvases_list.js"):
      '''Use CANVASES_LIST_TEMPLATE as a template to create a canvases list include for the browser.
         Write out only those canvases which have existing filename.png plots.
      '''
      CANVASES_LIST = []
      for scope in CANVASES_LIST_TEMPLATE:
          scope_entry = []
          if len(scope)>2:
              scope_entry = [scope[0],scope[1]]
              for canvas_entry in scope[2:]:
                  if isFileUnderDir("./",canvas_entry[1]):
                      scope_entry.append(canvas_entry)
          CANVASES_LIST.append(scope_entry)
  
      ff = open(fname,mode="w")
      print("var CANVASES_LIST = ", file=ff)
      json.dump(CANVASES_LIST,ff)
      ff.close()
function_tokens: def createCanvasesList ( fname = "canvases_list.js" ) : CANVASES_LIST = [ ] for scope in CANVASES_LIST_TEMPLATE : scope_entry = [ ] if len ( scope ) > 2 : scope_entry = [ scope [ 0 ] , scope [ 1 ] ] for canvas_entry in scope [ 2 : ] : if isFileUnderDir ( "./" , canvas_entry [ 1 ] ) : scope_entry . append ( canvas_entry ) CANVASES_LIST . append ( scope_entry ) ff = open ( fname , mode = "w" ) print ( "var CANVASES_LIST = " , file = ff ) json . dump ( CANVASES_LIST , ff ) ff . close ( )