← Back to team overview

yade-dev team mailing list archive

Re: Python scripts and clump creation

 


1. Creating instance of a class. It used to be obsucre like StandAloneEngine("PersistentSAPCollider", {'haveDistantTransient':True}). I introduced new syntax for it (like a month ago), which is much more pythonic: PersistentSAPCollider(haveDistantTransient=True). Have a look at scripts/simple-scene.py, I think it is more readable now.

Very nice! Now it looks like o.engines is a tuple of C functions even if it should not be (I imagine)

2. Accessing attributes. You have to use object['attribute'] notation to get real (serializable) attributes. It would be best to use object.attribute instead, but I am still investigating how to do it, as there are non-c++ attributes that are accessed in this way (like methods or object.name and so on).

It is not really annoying to use object['attribute'] instead of object.attribute. I said that python syntax is obscure but I know that the problem come from me. I have to think different...

Thank for adding the clump wrapper. It works fine.

Regards,
Vincent Richefeu



Follow ups

References