This is the mail archive of the frysk@sources.redhat.com mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: frysk and jython (Java Python)


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]