Question #685331 on Yade changed:
https://answers.launchpad.net/yade/+question/685331
Status: Open => Answered
Jan Stránský proposed the following answer:
Hi,
> repeatedly
because the error is encountered repeatedly in PyRunner
> Since I have defined "history()", I don't know what is the problem.
> NameError: name 'history' is not defined
>
> while 1:
> O.run(1000, True)
> ...
> def history():
as the error says, history() is not defined.
Python reads and executes the code line by line. It first reads some running,
but history() is defined afterwards (where Python has not yet been and has no
clue what is there).
Defining history() before O.run should do the trick
cheers
Jan
--
You received this question notification because your team yade-users is
an answer contact for Yade.
_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to : [email protected]
Unsubscribe : https://launchpad.net/~yade-users
More help : https://help.launchpad.net/ListHelp