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.

_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to