Hi
I create code in C# with implement Py code using IronPython. But I have this problems:
I have code in PY (MainFile.py at first row)
import My_H as my_h
My_H.py contain only more constant of dictionary like
My_STATE = {
'My_UP': 1,
'My_SB': 2,
'My_PF': 3,
}
I have a code in C# (VS 2013
C# + PTVS 2.1 VS 2013.msi + IronPython 2.7.5)
ScriptEngine engine = Python.CreateEngine();
engine.SetSearchPaths(new string[] { myPath });
ScriptSource source = engine.CreateScriptSourceFromFile("MainFile.py");
ScriptScope scope = engine.CreateScope();
source.Execute(scope); <--- exception
and
source.Execute in C# give this exception:
MissingMemberException was unhandled - LightException object has no attribute My_H
and second exception is in Python program. (This program code was created in PyDev and was right).
But when I run Python code from (VS 2013
Python + PTVS 2.1 VS 2013.msi + IronPython 2.7.5) this code give me a exception
import xml.sax
parser = xml.sax.make_parser( ) <--- exception
"No parsers found"
when I look in VS in debug mode I see
xml is
module 'xml' from 'C:\Program Files (x86)\IronPython 2.7\Lib\xml\__init__.py'
and this module contain Function (function
make_parser at 0x0000000000000042)
I found some solution for this exception, but not work for me
http://ironpython.codeplex.com/workitem/31361[
^]
Thank you