def strip_path(fpath):
 if (not fpath):
  return fpath
 try:
  (file_path, file_name) = os.path.split(fpath)
 except:
  file_name = fpath
 return file_name

def strip_path ( fpath ) : if ( not fpath ) : return fpath try : ( file_path , file_name ) = os . path . split ( fpath ) except : file_name = fpath return file_name
attempt to strip the path from a file name .