Thanks for the comment, reyalp.
I've visited this problem again, because I wanted to design a one-size-fits-all intervalometer, i.e. one that would do shots at fixed intervals (although I'm convinced that rawopint is the best for this kind of shooting), but also bracketed series ("superbrackets") as well as long continuous sequences.
What has occurred to me in the last couple of days is the difference in behaviour between
shoot
and
press/release/click "shoot_full"
which as far as I can see is not clearly documented.
If you set a camera to take a custom-timed series of, say, 10 shots after 0 s wait, then shoot halts the execution of the program until the 10 shots have been taken. However, if press/release/click shoot_full is used, the program immediately moves forward to the next line. This can be demonstrated by using the attached script.
In the case of shoot, the script prints one line to the output file, starts and finishes shooting, and only then enters the loop at the end.
In the case of press/release/click shoot_full, the script moves onto the loop before shooting is completed. In this way the internal workings of updating get_exp_count and get_free_disk_space can be revealed. E.g. on an SX160 get_exp_count is updated about 550 ms before the disk space changes.
For me this means that my intervalometer wsill have to use shoot when taking multiple brackets, so that the loop in my program can count the number of brackets correctly, otherwise it should use press shoot_full/sleep x/release shoot_full for longer continuous shooting, because shoot and continuous shoot on their own will only lead to a single shot being taken.
Took some time to get my head around this.