Hi,
I find this possibility on the JPython site. They have a Java library which implement the Python macro language. I think we can use it for the Clash. Here is a short embedded program :
import org.python.util.PythonInterpreter;
import org.python.core.*;
public class SimpleEmbedded {
public static void main(String []args)
throws PyException
{
PythonInterpreter interp = new PythonInterpreter();
System.out.println("Hello, brave new world");
interp.exec("import sys");
interp.exec("print sys");
interp.set("a", new PyInteger(42));
interp.exec("print a");
interp.exec("x = 2+2");
PyObject x = interp.get("x");
System.out.println("x: "+x);
System.out.println("Goodbye, cruel world");
}
}
(Huhh... The intends are disappear, sorry about the awfull look of the code.)
I think we need to use this macro language to program that parts of the Clash which runed by the event loop ones, twice and not time criticaly.
The URL: www.jpython.org/
Blade Runner
[This message has been edited by Blade Runner (edited June 03, 1999).]
[This message has been edited by Blade Runner (edited June 03, 1999).]
I find this possibility on the JPython site. They have a Java library which implement the Python macro language. I think we can use it for the Clash. Here is a short embedded program :
import org.python.util.PythonInterpreter;
import org.python.core.*;
public class SimpleEmbedded {
public static void main(String []args)
throws PyException
{
PythonInterpreter interp = new PythonInterpreter();
System.out.println("Hello, brave new world");
interp.exec("import sys");
interp.exec("print sys");
interp.set("a", new PyInteger(42));
interp.exec("print a");
interp.exec("x = 2+2");
PyObject x = interp.get("x");
System.out.println("x: "+x);
System.out.println("Goodbye, cruel world");
}
}
(Huhh... The intends are disappear, sorry about the awfull look of the code.)
I think we need to use this macro language to program that parts of the Clash which runed by the event loop ones, twice and not time criticaly.
The URL: www.jpython.org/
Blade Runner
[This message has been edited by Blade Runner (edited June 03, 1999).]
[This message has been edited by Blade Runner (edited June 03, 1999).]