yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #03859
Re: Launching scripts inside Yade ?
-
To:
yade-users@xxxxxxxxxxxxxxxxxxx
-
From:
Jerome Duriez <duriez@xxxxxxxxxxxxxxx>
-
Date:
Tue, 09 Nov 2010 10:19:49 +0100
-
In-reply-to:
<1289237376.11466.4.camel@falx>
-
User-agent:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.15) Gecko/20101027 Thunderbird/3.0.10
Le 08/11/2010 18:29, Václav Šmilauer a écrit :
There are 2 solutions (or 3):
1. Look at http://docs.python.org/library/functions.html#execfile and
pass globals as the second arg, like this:
execfile('script.py',globals())
For example, I just tried this one, it works. Thanks,
Jerome
References