Message6455
I guess that's also the reason why 'import collections' does not work, then?
Here's the code I use to integrate the Jython class into Java:
private MetaModel prepareMetaModel() throws IOException {
PySystemState engineSys = new PySystemState();
Py.setSystemState(engineSys);
PythonInterpreter interpreter = new PythonInterpreter();
InputStream resourceAsStream = Plugin.getResource("/src-py/MetaModel.py");
interpreter.execfile(resourceAsStream);
interpreter.exec("x = MetaModelImpl()");
Object x = interpreter.get("x").__tojava__(MetaModel.class);
MetaModel metaModel = (MetaModel) x;
return metaModel;
}
I guess the problem could be the empty PySystemState? Strangely, other packages like time seem to work just fine as it is. |
|
Date |
User |
Action |
Args |
2011-03-24 15:36:26 | hheimbuerger | set | messageid: <1300980986.44.0.118264769873.issue1722@psf.upfronthosting.co.za> |
2011-03-24 15:36:26 | hheimbuerger | set | recipients:
+ hheimbuerger, pjenvey |
2011-03-24 15:36:26 | hheimbuerger | link | issue1722 messages |
2011-03-24 15:36:26 | hheimbuerger | create | |
|