← Back to team overview

yade-users team mailing list archive

[Question #239546]: Functions "not defined" through yade terminal, but defined through script ?

 

New question #239546 on Yade:
https://answers.launchpad.net/yade/+question/239546

Hi,

If type these lines in Yade terminal :

(starting Yade)
----------------
def printIt():
    print O.iter

O.engines=[PyRunner(command='printIt()',iterPeriod=1)]
O.run(10)
----------------
I get error "name 'printIt' is not defined"


While, if i put these same lines (copy-paste) in a script test.py, that I run directly (with ./yade*** test.py), everything is fine....

Would someone know the reason ? 

Jerome

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.