Scripting With Java and Python
by Boudewijn Rempt

Example 1:

class Console (Object):
  def __init__(self, adapter=None, adapterName=""):
    "@sig public Console(Object adapter, 
                     java.lang.String adapterName)" 
 
Example 2:

> jythonc --deep  --package com.tryllian.pyconsole 
                             --jar pyconsole.jar Console.py 

Example 3:

public ManagementConsole(SwingAgentBridge swingAgentBridge) {
   super("Management Console");
   managementGuiAdapter = new ManagementGuiAdapter( swingAgentBridge, this );
   Console console=new Console(managementGuiAdapter, "managementAdapter");
   JScrollPane pane=new JScrollPane(console.getTextPane());
   console.write("Tryllian AFC Habitat Management Console\n" +
                                "Uses Jython technology.\n" ,"output");
   console.capturePythonOutput();
   console.getTextPane().requestFocus();
   console.newInput();
   getContentPane().add(pane);
}



1

