Guest User

Untitled

a guest
Dec 14th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. public class SimpleEmbedded {
  2. public static void main(String []args){
  3.  
  4. PythonInterpreter interp = new PythonInterpreter();
  5. System.out.println("Hello, world from Java");
  6. interp.execfile("text_rec.py");
  7. System.out.println("Goodbye ");
  8. }
  9. }
  10.  
  11. interp = new PythonInterpreter(null, new PySystemState());
  12. PySystemState sys = Py.getSystemState();
  13. sys.path.append(new PyString(rootPath));
  14. sys.path.append(new PyString(modulesDir));
Add Comment
Please, Sign In to add comment