https://pantsbuild.org/ logo
#general
Title
# general
a

acoustic-sandwich-56640

08/10/2021, 6:48 PM
I was noticing that I wasn't getting any stdout/stderr output until the end of my batch job run from a built pex file. I'm assuming pex is using Popen.communicate or something similar somewhere in the call chain that holds on to the piped output. Is this the expected behavior?
w

witty-crayon-22786

08/10/2021, 6:51 PM
hey Andy!
so, you built a PEX file, and then executed it, á la:
Copy code
./my.pex
?
if so: PEX files don’t subprocess your code: they run using a bootstrap python, and then re-exec to whichever python matches your interpreter constraints
python itself does do buffering though, and you might be encountering that? https://stackoverflow.com/questions/107705/disable-output-buffering
a

acoustic-sandwich-56640

08/10/2021, 6:58 PM
It's not clear if it makes a difference, but we actually are running it python3 ./my.pex ...
w

witty-crayon-22786

08/10/2021, 6:59 PM
shouldn’t make a difference
2 Views