But I don't actually know what the new behavior is. I think it is that it never receives a termination signal, and is then just killed instead, and if that is the case, how can I modify it do catch that?
What I intend to do tomorrow is to rewrite all the output (which I had hoped to avoid having to do for this) to write directly to a log file instead of trying to capture the print statements for this initially "only-meant-for-me" piece of code. That way I won't have to do anything but run the Python script and it should receive the termination signal as intended. But as I said, I would still like to understand what is going on.
Oh yeah, then that is how it really is. The script runs fine, the output is correctly piped, but it is just the signal handling that doesn't work.