Is there a way to do something like `os.path.dirna...
# general
c
Is there a way to do something like
os.path.dirname(__file__)
that will behave consistently between run.py and running a pex? With run:
/home/csb/gvs/ops/2ops/.pants.d/python-setup/chroots/54755f3eeed3326c8c51aafcd165a3e1d0df2512/certifi/cacert.pem
with pex
/home/csb/gvs/ops/2ops/tools/cobbling-time/bin/cobbling-time.shoe-sizer.pex/certifi/cacert.pem
(The obvious right answer is to use
pkgutil.get_data
but I'm working with a 3rd party library that really really wants a file on disk)