This is the mail archive of the
frysk@sources.redhat.com
mailing list for the frysk project.
Re: frysk and jython (Java Python)
- From: Stan Cox <scox at redhat dot com>
- To: Andrew Cagney <cagney at redhat dot com>
- Cc: frysk <frysk at sources dot redhat dot com>
- Date: Mon, 19 Dec 2005 10:57:35 -0500
- Subject: Re: frysk and jython (Java Python)
- References: <437BA9FB.5000005@redhat.com>
On Wed, 2005-11-16 at 16:51 -0500, Andrew Cagney wrote:
> Here's a little proof-of-concept showing jython (http://www.jython.org),
The following works (interactively via
CLASSPATH=~/jython/jython.jar ./gij.sh org.python.util.jython)
from frysk.proc import Manager
Manager.eventLoop.start ()
h = Manager.host
me = h.getSelf ()
print me
print me.getCommand()
print me.getTasks()
h.requestCreateAttachedProc (["sleep","1000"])
me.getChildren()
child = me.getChildren()[0]
but if you put it in a script and execute via
(CLASSPATH=~/jython/jython.jar ./gij.sh org.python.util.jython
script.jy) you get:
Traceback (innermost last):
File "/home/scox/accu/test.jy", line 10, in ?
KeyError: 0
It is convenient to type python scripts in an editor that will do the
indentation automatically.