So finally I am beginning to get the grasp on Python AND Python for Shade.
And the result is that I have successfully written the first version (hence beta) of a script that, via .chan files, you can use to import camera motions from third party programs into Shade.
.chan files is a standard camera transformation file format, especially interesting because it is a standard text file, which makes processing it easier. There are import/export plugins/scripts for .chan files for Maya, Softimage, 3dsmax, Nuke, after effects, and so on.
How it works is:
You run it (duh)
It opens a file dialogue which lets you browse for the .chan file. You click ok.
It creates a camera nested under a ball joint, and then begins moving and rotating the joint (hence the camera) as per the .chan file.
So what is missing?
Shade cameras are different from what most other 3d programs work in that you cannot rotate it along the equivalent of the bank axis if you rotate it, you either have to use the bank control in the camera properties window, or parent it to a ball joint, set it's mode as "Free", and rotate the joint instead of the camera.
Now some things are lacking in the script.
First of all, the .chan file also has a value for a camera something which should translate to focal length, but I have yet to discover the formula to convert it. I need more experimenting to find out.
And second, I have not been able to find (yet) what is the python call in Shade to change the camera mode. Or to change the bank value, for that matter.
So, the bank rotation will not work.
If I fail to find the needed method, I might ask the user to manually change the camera mode to "free". But making it completely automatic would be, of course, better.
So, here is the link to the zip file. It contains the python script, as well as the .chan test file I have been using. I will make a more complex .chan file for further development, but meanwhile, I share what I have.
I hope somebody finds it useful, the python script is fully commented.