def format_filename(filename, shorten=False):
 if shorten:
  filename = os.path.basename(filename)
 return filename_to_ui(filename)

def format_filename ( filename , shorten = False ) : if shorten : filename = os . path . basename ( filename ) return filename_to_ui ( filename )
formats a filename for user display .