def get_filename(path):
 try:
  return os.path.split(path)[1]
 except:
  return ''

def get_filename ( path ) : try : return os . path . split ( path ) [ 1 ] except : return ''
return path without the file extension .