parent in python

I just want to make parent/child link between 2 objects in python ,but, when I do something like that :

obj = Blender.Object.Get(“lalalal”)
obj2 = Blender.Object.Get(lililili")
obj.parent = obj2

… it doesn’t work :

“AttributeError : cannot directly assign to item”

I precise that I use the 2.23 release

Is there anybody know how ?

It means it’a a read only attribute… it’s probably not possible (yet) to parent via python in 2.23.

I’m sure it’s possible. If there are some competent people to answer this query.
Please, reply…

Thank You very much…

I don’t have the documentations in front of me right now, but I also believe there’s a way to parent in Python. I think the method is called makeParent or something like this.

Of course, Devas is right when saying that the .parent attribute is read-only.

Martin

Thank you very very very much Martin !!!

It’s working !

et comme t’es de Montreal, si tu parles français : merci, ça fait 1 semaine qu’on est dessus !

ouais, je parle français…

Martin