[IronPython] import statement inside .py file not working
senthilkumar
senthilkumar.chockalingam at kla-tencor.com
Fri Sep 17 07:37:27 CEST 2004
I have one .py file which has only one statements such as
import System
I have one windows or console application which invokes IronPython
Component.
This application has a method to execute python file which has the below set
of statements
sys.path.append(Path.GetDirectoryName(strFilePath));
Parser objParser = Parser.fromFile(strFilePath);
Stmt objStmt = objParser.parseFileInput();
NameEnv objEnvironment = new NameEnv(new module(), null);
objStmt.Execute(objEnvironment);
When executing it gives the following error
System.NotImplementedException: execute: IronPython.AST.ImportStmt
at IronPython.AST.Stmt.Execute(NameEnv env) in
f:\software\ironpython-0.6\ironpython\ast\stmt.cs:line 33
at IronPython.AST.SuiteStmt.Execute(NameEnv env) in
f:\software\ironpython-0.6\ironpython\ast\stmt.cs:line 56
at
klatencor.cp.apps.programs.CPythonInterpreter.CPythonInteractiveInterpreter.
pushFile(String strFilePath) in
e:\projects\cpythonwizard\cpythoninteractiveinterpreter\cpythoninteractivein
terpreter.cs:line 75
Please assist me
Thanks and Regards
Senthil Kumar
More information about the Ironpython-users
mailing list