As far as I can see, Octopus is quite black-boxy in how it executes python scripts. Specifically I’m looking for ways to control the PYTHONBUFFERED setting which controls how stdout is buffered. Is there a way for me to control this for python scripts (other than calling the python script from a shell script)?
Thanks for getting in touch!
You are pretty much spot on with your assessment of this.
The main way to achieve this currently would be to add your python script(s) to a package and then reference the package within your script step with the additional arguments required.
thanks. Yup we used to do that, but now that there’s a python-native
get_octopusvariable function we have migrated to using python directly. I would like to suggest that Octopus sets the PYTHONBUFFERED variable (or the
-u switch which is the same thing) when Octopus executes python code. I can’t see any situation where that’s not the right thing to do.
I will raise this with our products team to see if it is something that we can implement.
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.