For those that use both Python and CDO, I wrote a library of function decorators that tries to make it easier to read, write and understand CDO command chains.
The motivation was that CDO commands can be long and confusing (it’s my no.1 criticism of CDO). Because of the shell syntax of command input output, in order to read/write them, you have to start at the end of the command and read backwards. Filenames can also be very long. The python bindings don’t make this much easier because you have to pass the shell formatted command chain to the input keyword argument of the CDO commands and it just ends up looking the same.
The python CDO interface developers are working on a new object oriented syntax that uses method calls that are chained together, but that’s just not ready yet. I wanted something where I could list the chained commands vertically and be able to see everything in the same page and the exact order in which they are done.
If you’re comfortable with using function decorators in python, maybe you will find this useful.