From: Hugh R. <rod...@ag...> - 2002-01-29 17:06:30
|
Hello - I have written a Java GUI that loads a Jython script and then attempts to run it using an embedded Jython interpreter, i.e., the PythonInterpreter class and/or the InteractiveInterpreter class. I have been unable to capture the output of the script as it runs so I can display its progress in my Java GUI. Using the InteractiveInterpreter I sent the Jython script to the embedded interpreter line-by-line and caputer the output by using the setOut() method with a StringWriter output stream. This worked for the "topmost" Jython script, but when the executing script called my functions that were defined in another Jython script (which it found), the output stopped being retrieved until the entire script ran to completion. And I have yet to figure out how to capture the output when I use the PythonInterpreter.exec(String s) method. Any ideas? I'm stumped. Thanks! Hugh |