Hi rubeus,
Yes, there is a bug in the wrapper.py but only for appending to the very end of the spine. Luckily there is a workaround using the other interface routines until we fix this in the next release.
Please try the following:
Code:
uid = 'T12345'
bk.addfile(uid, 'Test0001.xhtml', xml, 'application/xhtml+xml')
new_spine = bk.getspine()
new_spine.append((uid, None))
bk.setspine(new_spine)
Please let me know if that does the trick.
The spine_insert_before call does work for prepending to the spine and putting it in the middle someplace, but just not for appending to the end. I have already fixed this in master for the next release.
Thanks for the bug report!
KevinH