← Back to team overview

yade-dev team mailing list archive

[Bug 588387] [NEW] problem with python globals

 

Public bug reported:

As discussed in yade-dev list. Python globals will behave differently if
there is a run() in the invoked script or not.

Here is a script. If you run it straightaway, it will print :

"refstrain= 2.0  (should be 2.0), phase= 1  (should be 1)"

Now, comment the two last lines and run it again (clicking "play" for
instance, until it stops automatically or as soon as you see "Now εz
will go from 0 to .2" output). Typing  "print refstrain,phase" will then
return : 0.0 0, as if the "global" directive was ignored.

** Affects: yade
     Importance: Undecided
         Status: New

-- 
problem with python globals
https://bugs.launchpad.net/bugs/588387
You received this bug notification because you are a member of Yade
developers, which is subscribed to Yade.

Status in Yet Another Dynamic Engine: New

Bug description:
As discussed in yade-dev list. Python globals will behave differently if there is a run() in the invoked script or not.

Here is a script. If you run it straightaway, it will print :

"refstrain= 2.0  (should be 2.0), phase= 1  (should be 1)"

Now, comment the two last lines and run it again (clicking "play" for instance, until it stops automatically or as soon as you see "Now εz will go from 0 to .2" output). Typing  "print refstrain,phase" will then return : 0.0 0, as if the "global" directive was ignored.





Follow ups

References