SHARE
TWEET

Untitled

a guest Dec 14th, 2018 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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));
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top