Re: bug? using :import from within :execute
Tim Hemel <[email protected]> Fri, 10 Sep 2004 12:09:09 +0200
| Newsgroups | gmane.comp.tools.aap.user |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 2004-09-10 at 11:40, Tim Hemel wrote:
> The following hack seems to work, but not sure if it works for more than
> one layer of :execute commands:
>
> In bla_sub2/main.aap:
>
> :import taptu
> @m_taptu = _tree.get('m_taptu')
>
> I got this idea by looking at the source code for Scope.py. Still, I
> think that this behaviour should be hidden from the user, and that
> modules should be available from the current scope.
>
It turned out that in my real version of this problem it still was
not solved. I patched Scope.py, in the function get_build_recdict()
I changed the following code:
# Add the user scopes.
for n in recdict["_top"].user_scope_names:
new_recdict[n] = recdict[n]
to:
# Add the user scopes.
for n in recdict["_top"].user_scope_names:
new_recdict[n] = recdict.get(n)
which is also not the most beautiful solution, but it seems to work
now.
Tim
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php