happy-kitchen-89482
05/26/2022, 1:46 PM./pants run, right?happy-kitchen-89482
05/26/2022, 1:46 PMbitter-ability-32190
05/26/2022, 1:53 PMpolite-garden-50641
05/26/2022, 1:57 PM./pants run since when the pex file runs it is like running a python script (the only process that runs in isolation is the pex build) once the code runs it is not isolated and it has access to the local file system whatever the cwd is.
I don't use it since it is faster for me to just use the underlying VE which I already have rather than wait for pants to build the pex file and run it.polite-garden-50641
05/26/2022, 1:57 PMbitter-ability-32190
05/26/2022, 2:06 PMand it has access to the local file system whatever the cwd is.How does Django know to ouput relative to CWD, then and not the caller's
__file__ which will be in the tempdir?
This seems like shouldn't work, so thats surprisingpolite-garden-50641
05/26/2022, 2:20 PM./pants run is just like doing ./pants package and then just running the pex file (./dist/my_script.pex)bitter-ability-32190
05/26/2022, 2:22 PM__file__ will not give you the sandbox path, which isn't relative to CWD (at least not in a meaningful way). So I'm not sure how Django can remedy that fact in a meaningful way.
I guess, what's the full command/code look like? Maybe I'm missing something?polite-garden-50641
05/26/2022, 2:23 PMpolite-garden-50641
05/26/2022, 2:23 PMbitter-ability-32190
05/26/2022, 2:23 PMbitter-ability-32190
05/26/2022, 2:23 PMpolite-garden-50641
05/26/2022, 2:24 PMpolite-garden-50641
05/26/2022, 2:25 PMbitter-ability-32190
05/26/2022, 2:25 PMpolite-garden-50641
05/26/2022, 2:25 PMpolite-garden-50641
05/26/2022, 2:25 PMbitter-ability-32190
05/26/2022, 2:26 PMbitter-ability-32190
05/26/2022, 2:29 PMpolite-garden-50641
05/26/2022, 2:33 PMbitter-ability-32190
05/26/2022, 2:34 PMpolite-garden-50641
05/26/2022, 2:35 PMpolite-garden-50641
05/26/2022, 2:35 PMbitter-ability-32190
05/26/2022, 2:36 PMpolite-garden-50641
05/26/2022, 2:38 PMpolite-garden-50641
05/26/2022, 2:38 PMhappy-kitchen-89482
05/26/2022, 3:58 PMbitter-ability-32190
05/26/2022, 3:59 PM