def resource_path(relative_path):
 try:
  base_path = sys._MEIPASS
 except Exception:
  base_path = os.path.abspath('.')
 return os.path.join(base_path, relative_path)

def resource_path ( relative_path ) : try : base_path = sys . _MEIPASS except Exception : base_path = os . path . abspath ( '.' ) return os . path . join ( base_path , relative_path )
return a string object representing the absolute physical path of the resource object based on its position in the resource tree .