-
Notifications
You must be signed in to change notification settings - Fork 150
Nathan Jensen edited this page Aug 31, 2015
·
28 revisions
- Jep supports Linux, OS X, and Windows 7 and up. Other variants of *nix may also work.
- We haven't tried it yet. In theory it should possible, but there may be some challenges to overcome. If you try this, we'd love to hear about it and will gladly accept contributions to make Jep work well on more platforms.
- Jep should work with any pure python modules. Unfortunately, CPython extensions and Cython modules may not work correctly, it depends on how they were coded. We have started a list of Package Compatibility. Please contribute to the list with your findings.
- Jep has been run with Swing and SWT. We haven't tried JavaFX yet, but it should work.
try(Jep jep = new Jep(false)) {
jep.eval("import somePyModule");
// any of the following work, these are just pseudo-examples
// using eval(String) to invoke methods
jep.setValue("arg", obj);
jep.eval("x = somePyModule.foo1(arg)");
Object result1 = jep.getValue("x");
// using getValue(String) to invoke methods
Object result2 = jep.getValue("somePyModule.foo2()");
// using invoke to invoke methods
Object result3 = jep.invoke("somePyModule.foo3", obj);
// using runScript
jep.runScript("path/To/Script");
}