← Back to team overview

yade-users team mailing list archive

Re: O.engines.append ?

 

2010/4/15 Václav Šmilauer <eudoxos@xxxxxxxx>

>
> > I do not succeed, once I defined O.engines=[...], to add other Engines
> > with O.engines.append
> > Could it be possible or not ?
>
> you have to say
>
>        O.engines=O.engines+[YourEngine()]
>
I have tried this way and you insert the engine at the end of the list (or
vector). What if you want to insert the engine at a specific position? If
.append does not work I suppose that also .insert does not as well..

cheers, Chiara

>
> (reason: O.engines is a std::vector in c++ and list in python, which is
> converted back and forth (r-value, if you want); it is not a wrapped
> type as e.g. BodyContainer, which can define additional methods)
>
> Cheers, v.
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
> Post to     : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
> More help   : https://help.launchpad.net/ListHelp
>

Follow ups

References