I think this has been asked already but I'm strugg...
# general
r
I think this has been asked already but I'm struggling to run random script wrapped inside a PEX which is generated using
pex_binary
in
venv
mode. I didn't set any of these scripts as an entry point. Is this possible?
1
e
What means of run? Is it via
subprocess
?
r
no just
python <script_location_inside_pex>
? I am not sure if that’s how you would do it though
e
pex --help-variables
is your friend, but
PEX_MODULE=package.module:function the/pex/file.pex
or
PEX_MODULE=package.module:function python the/pex/file.pex
👍 1
There is also
PEX_SCRIPT
to have it run a console script from one of the 3rdparty distributions inside it.
r
Yeah I was trying to use
PEX_SCRIPT
but somehow missed
PEX_MODULE
. That works! Thank you!