← Back to team overview

yade-users team mailing list archive

Re: Storing variables with python

 

> if iterPeriod is equal to zero, then the engine is not going to be run
> and so the function addPlotData (just tried, hope it is expected). But
> setting a positive iterPeriod and using the loop above (where this
> time myRecorder.iterPeriod==a_pos_value) it works well the same! 

Eh, uh, I am wondering why I thought it was a very bright idea -- I
think because you would avoid the global and store the as a parameter of
the engine. Of course you are right... But... You could have:

def checkCondition():
	if condition: myRecorder.command='addPlotData()' # checkCondition will not be called anymore
def addPlotData():
	...

:-)






References