ok, so does python or blender execute each line of code as it is read or does it do some reorganization when using parent or object.applyRotation(vector,0)?
here is my problem, I am parenting a group of objects (bricks) to another ghost object which I place at their mean location. I then parent that ghost object to my character and walk around. When I have the objects (bricks) where I want them (i.e. like stacking lego bricks on top of each other) I run a definition that snaps the ghost object to 1/4 BU and the orientation to the nearest 15 degree increment. Then before the script finishes running I remove all the children of the ghost object and end the script.
The problem seems to be that the ghost object is loosing its children THEN snapping its position and orientation, which is backwards to the way I wrote the script.
So what is going on!!!