Your TestOther class is not public so IronPython can't access it, hence the exception.
Martin -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stanislas Pinte Sent: Friday, February 10, 2006 4:10 AM To: [email protected] Subject: [IronPython] Bug in engine.LoadAssembly(...) -> PythonImportError Hello, I have troubles importing classes defined in my own assembly: [Release]> ./TestImport.exe Unhandled Exception: IronPython.Runtime.PythonImportError: No module named Other at IronPython.Runtime.ReflectedMethodBase.Invoke(MethodBinding binding) .. at TestAccessOtherNamespace.Initialize() in c:TempTestImportTestImportbin ReleaseTestAccessOtherNamespace.py:line 1 I am actually trying to give access to all the namespaces defined in the main assembly, like that: class Program { static void Main(string[] args) { PythonEngine engine = new PythonEngine(); //allow python scrupts to import all classes of my assembly engine.LoadAssembly(Assembly.GetAssembly(typeof(Program))); engine.AddToPath(@"."); engine.Import("TestAccessOtherNamespace"); } } Am I missing anything? See attached full source code (c# program, and python script). Thanks a lot, Stan. _______________________________________________ users mailing list [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
