← Back to team overview

yade-users team mailing list archive

Re: [Question #293179]: 'Name error' while calling function

 

Question #293179 on Yade changed:
https://answers.launchpad.net/yade/+question/293179

Jérôme Duriez posted a new comment:
Regarding #6, I think your problem arose from variable scope (global or
local) -- rather than modules issues.

Python variables / functions may have different scope (leading to
possibility or impossibility to access them) depending how you launch
your python script.

I bet that your python "plotAddData" function had a local scope when
using execfile(...), as opposed to a global one when using yade
yourScript.py

There has been previous (more precise) discussion on such topic in the
mailing list before, but I can not tell you where/when...

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.