nodes: 0, module; 1, function_definition; 2, function_name:get_file_list; 3, parameters; 4, block; 5, identifier:shortFile; 6, expression_statement; 7, if_statement; 8, comment:# expand tilde and variables; 9, expression_statement; 10, comment:# expand wildcards; 11, expression_statement; 12, comment:# sort alphabetical,; 13, comment:# if list is emtpy, sorting returns None, so better do not sort; 14, if_statement; 15, return_statement; 16, comment:"""
      The function get_file_list expands a short filename to a sorted list
      of filenames. The short filename can contain variables and wildcards.
      """; 17, comparison_operator:"://" in shortFile; 18, comment:# seems to be a URL; 19, block; 20, assignment; 21, assignment; 22, comparison_operator:len(fileList) != 0; 23, block; 24, else_clause; 25, identifier:fileList; 26, string:"://"; 27, identifier:shortFile; 28, return_statement; 29, identifier:expandedFile; 30, call; 31, identifier:fileList; 32, call; 33, call; 34, integer:0; 35, expression_statement; 36, block; 37, list; 38, attribute; 39, argument_list; 40, attribute; 41, argument_list; 42, identifier:len; 43, argument_list; 44, call; 45, expression_statement; 46, identifier:shortFile; 47, attribute; 48, identifier:expandvars; 49, call; 50, identifier:glob; 51, identifier:glob; 52, identifier:expandedFile; 53, identifier:fileList; 54, attribute; 55, argument_list; 56, call; 57, identifier:os; 58, identifier:path; 59, attribute; 60, argument_list; 61, identifier:fileList; 62, identifier:sort; 63, attribute; 64, argument_list; 65, attribute; 66, identifier:expanduser; 67, identifier:shortFile; 68, identifier:logging; 69, identifier:warning; 70, string:"No file matches '%s'."; 71, identifier:shortFile; 72, identifier:os; 73, identifier:path
code: def get_file_list(shortFile):
      """
      The function get_file_list expands a short filename to a sorted list
      of filenames. The short filename can contain variables and wildcards.
      """
      if "://" in shortFile: # seems to be a URL
          return [shortFile]
  
      # expand tilde and variables
      expandedFile = os.path.expandvars(os.path.expanduser(shortFile))
  
      # expand wildcards
      fileList = glob.glob(expandedFile)
  
      # sort alphabetical,
      # if list is emtpy, sorting returns None, so better do not sort
      if len(fileList) != 0:
          fileList.sort()
      else:
          logging.warning("No file matches '%s'.", shortFile)
  
      return fileList