Adding object as child


I want an object to add another object but have that added object be parented to the first. Is there any way to do this with python? thx


thats pretty easy

monster = scene.addObject("monster",spawner,0)
child = scene.addObject("child",monster,0)

would that still work if i had multiple of the same object already in the scene?

yes it will