Why would adding a parent with Python make the child unmovable?
This works fine: 

import bpy

C = bpy.context
bpy.ops.object.text_add(location=(0, 0, 0))
a = C.object 
bpy.ops.object.empty_add(type='PLAIN_AXES', location=(0, 0, 1))
b = C.object
a.parent = b
a.matrix_parent_inverse = b.matrix_world.inverted()


As you can see:



There must be something wrong with the code you use for creating the objects.
You should try removing the parenting part of your code and see if the code around it works fine.