def get_is_file_present(name):
 global NAME_PREFIX
 name = name.replace(NAME_PREFIX, '')
 filename = ('/' + name.replace('_present', '').replace('_', '/'))
 if os.path.isfile(filename):
  return 1
 else:
  return 0

def get_is_file_present ( name ) : global NAME_PREFIX name = name . replace ( NAME_PREFIX , '' ) filename = ( '/' + name . replace ( '_present' , '' ) . replace ( '_' , '/' ) ) if os . path . isfile ( filename ) : return 1 else : return 0
find whether file exists .