Re: [Python.NET] RunString does not work

2007-03-05 Thread Brian Lloyd
FYI, if you are getting a NameError using RunString that usually means that the string you run needs to do some imports ‹ remember that RunString creates (essentially) a totally new global local namespace, so you¹ll need to import any names you need in your code snippet. e.g. CLR.Food.SpamAn

Re: [Python.NET] RunString does not work

2007-03-05 Thread Seshagiri Cherukuri
thanks for your reply. I had the necessary imports in place but was still seeing the error. The following code from Michael Eddington resolved the issue (I think the current problem is because of the dictionary being used) public static PyObject RunString(string code) { PyObje