← Back to team overview

yade-users team mailing list archive

Re: [Question #406775]: about the local variable

 

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

    Status: Open => Answered

Jérôme Duriez proposed the following answer:
Hi,

As you may have understood, the problem is that "tjii1" is not known inside delete() function in spite of all your "globals()" and "locals()" commands.
I'm not a specialist about these globals() and locals() commands but you may try one of the following

- either simply define in your main script "global tjii1" and do the
same inside delete() function with another "global tjii1" statement
within the function definition

- or pass tjii1 as an attribute to delete() function. The function definition would look like 
def delete(genericSet):
or 
def delete(tjii1):
 if you wish

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