2

I am trying to embed Jython in Java because I need to be able to reuse some python code that is parsing a yaml. When I try to run the code below:

interp.exec("import sys");
interp.exec("print sys.version");
interp.exec("sys.path.append(\'C:/MyScripts\')");
interp.exec("import MyYAMLReader");

I get an error:

ImportError: No module named yaml

How can I resolve this? I am currently coding in Eclipse and have the jython2.7 jar. Is there anything else I need to be able to run this?

Pang
  • 9,564
  • 146
  • 81
  • 122

0 Answers0