well done!
it's very nice to see this solution being posted to a philatelic forum!
just some comments to your script:
- initialize your values to 0 or an empty value not to a random value... this will help understanding what happens ... (in a comment you can add the meaning of the variables, if necessary)
- while you're generally using good names for your variables, height 1 to 4 could need a new name :-)
- you can use PIL (python image library) to calculate the size of the images... it may simplify your xml...
- in my eyes, "stampHeight = float(subelement[4].text)" is more readable then a version in two lines...
- use styles instead of direct formatting (you can check at the beginning of the script if the style already exists and create if not)
- put a license at the beginning of your script, when you publish it (in most countries, copyright is automatic, so we need a license to use, change and distribute your script)
- at the beginning of the script, read the current unit, set your preferred unit and at then of the script restore the current unit (the value will be very different when inch rather than mm is selected...)
- you can calculate an approximative grid where you place your elements, instead of putting them on top of each other... this will make your users a bit happier (and create a new page when the current page has got enough elements...; the number of rows and columns can be a parameter at the beginning of your script -> and, then, calculate the height and width of each cell)
- in the script or in your post in the stamp-forum, you can mention that anybody wanting to use and tweak the script can open the F1 help in scribus and browse the development section where he or she will find the meaning of the functions you use
that's it. :-)
all in all: you did a good job!
if you want to work on any of the topics i'm mentioning and you don't know how to do it, just ask!
have a nice weekend
a.l.e