Newbie question here: what’s the appropriate API for locating or even opening a file that’s included inside an EUPS package. Say I want to include a YAML file with KPM definitions from LPM-17 in the validate_drp
package. What API do I use to build an absolute path to that file in the installed validate_drp
, or even read a file object? I’m looking for the EUPS equivalent of setuptools’ pkg_resources.
Also available in Python via SWIG.
1 Like
In python:
import os
from lsst.utils import getPackageDir
filename = os.path.join(getPackageDir("validate_drp"), "examples", "Decam.yaml")
1 Like