Assume I have a python script that runs a GPL library binary through command line (through os.system('GPL call') and then analyze the output (which comes from the terminal). Is that a collaborative work? If so, does the GPL library apply as the all code? Or is it considered linking?
Firstly, IANAL/IANYL, and the whole question of derivative works is still somewhat unsettled by courts around the world.
That said, the FSF addresses this issue with respect to plugins, and since copyright law makes no explicit mention of plugins as being special, the analysis can be applied to other questions of derivative works. They write:
A main program that uses simple fork and exec to invoke plug-ins and does not establish intimate communication between them results in the plug-ins being a separate program.
though they also note that
If the main program uses fork and exec to invoke plug-ins, and they establish intimate communication by sharing complex data structures, or shipping complex data structures back and forth, that can make them one single combined program.
So if this is honest fork-and-exec, that is if your program invokes the GPL program through a system call and no additional complex, programme-specific structure is passed around the back, then the two works are separate.