Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 16th, 2012  |  syntax: None  |  size: 0.21 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Calling a python script over HTTP
  2. tomcat/webapps/myscript/page.html
  3.        
  4. python script.py
  5.        
  6. Process proc = Runtime.getRuntime().exec("python /DIR_FOR_SCRIPT/script.py");
  7. proc.waitFor();
  8. closeProcess(proc);