[IronPython] System.Scripting.Runtime.UnboundNameException
Huzaifa
huzi_1982 at hotmail.com
Sun Aug 10 10:22:20 CEST 2008
i am trying this code and it is giving me exception
"$exception {"name 'name' is not defined"} System.Exception
{System.Scripting.Runtime.UnboundNameException}
"
CODE:
ScriptRuntime env = ScriptRuntime.Create ( );
ScriptScope defaultScope = env.CreateScope ( );
ScriptEngine curEngine = env.GetEngine ("py");
ScriptSource input;
env.LoadAssembly (typeof (System.Diagnostics.Debug).Assembly);
env.Globals.SetVariable("name","Huzaifa");
input = curEngine.CreateScriptSourceFromString (
@"import clr
from System import *
from System.Windows.Forms import *
MessageBox.Show(name)
", SourceCodeKind.Statements);
input.Execute (defaultScope);
--
View this message in context: http://www.nabble.com/System.Scripting.Runtime.UnboundNameException-tp18911599p18911599.html
Sent from the IronPython mailing list archive at Nabble.com.
More information about the Ironpython-users
mailing list