From 141e7eb460480adee925081e2e9c133cecd38db8 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Sun, 24 Aug 2008 16:54:38 +0000 Subject: [PATCH] Moved execution into global namespace. Fixes import statements inside of 2008-08-24 Lars-Peter Clausen * plug-ins/pygimp/plug-ins/python-fu-eval.py: Moved execution into global namespace. Fixes import statements inside of evaled code. svn path=/trunk/; revision=26746 --- ChangeLog | 5 +++++ plug-ins/pygimp/plug-ins/python-eval.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0186a03a80..5409889058 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-08-24 Lars-Peter Clausen + + * plug-ins/pygimp/plug-ins/python-fu-eval.py: Moved execution into + global namespace. Fixes import statements inside of evaled code. + 2008-08-24 Lars-Peter Clausen * plug-ins/pygimp/pygimp-pdb.c (pdb_getattro): Fix wrong strcmp diff --git a/plug-ins/pygimp/plug-ins/python-eval.py b/plug-ins/pygimp/plug-ins/python-eval.py index 5335c22b82..77a30cff84 100755 --- a/plug-ins/pygimp/plug-ins/python-eval.py +++ b/plug-ins/pygimp/plug-ins/python-eval.py @@ -23,7 +23,7 @@ def code_eval(code): if code == '-': import sys code = sys.stdin - exec code + exec code in globals() register( "python-fu-eval",