Re: CVS Update: Barracuda
"Diez B. Roggisch" <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
Jacob Kjome wrote:
>
> What would the assembler that this gets fed to look like? I'm not
> clear on that? Would it be something like...
>
> public void assemble() {
> boolean success = JythonInterpreter.interpret(theInputStream);
> logger.debug("successful interpretation of jython script? " + success);
> }
Basically, it looks like that.
import org.python.core.*;
import org.python.util.*;
...
PythonInterpreter interp = new PythonInterpreter();
interp.exec("print 'Hello World! '\n");
This is from
http://www.oetrends.com/cgi-bin/page_display.cgi?214
You can of cours add several lines of code from a Reader and then
execute the whole batch. I'm to lazy to look it up right now :), but I
already did it.
> If it is as simple as this, maybe we can leave the object repository
> assembler alone and create a separate jython assembler. Maybe someone
> can fill in what the actual assembler would look like?
Good idea.
Diez