[1669] in Software_Announce

home help back first fref pref prev next nref lref last post

Jython JVM-based Python interpreter installed on Athena

daemon@ATHENA.MIT.EDU (David Glasser)
Wed Nov 30 22:33:04 2005

Date: Wed, 30 Nov 2005 22:32:58 -0500
From: David Glasser <glasser@MIT.EDU>
To: software-announce@mit.edu, sipb-office@mit.edu, punya@mit.edu

On 11/28/05, David Glasser <glasser@mit.edu> wrote:
> If you've found yourself wanting to
> use pre-existing Java libraries but wishing for a language with more
> list-processing and closure abilities, a cleaner syntax, and less
> verbose type annotation than Java, Scala may be the language for you.

> Instance: scala Time: Mon Nov 28 14:39:41 2005 Host: swat.thok.org
> From: @b(Jane's NBC Protection Equipment) <eichin>
>
> (given that python has everything in that paragraph,
> why would I want scala?)

Point taken.  I have installed the current version of Jython, the
JVM-based Python interpreter, in the jython locker in the SIPB cell.

More information can be found in /mit/jython/README and
http://www.python.org/.  This installation has no platform-specific
binaries; all code is shell or Java.  It uses whatever 'java'
implementation happens to be in your path.  It ought to work on any
vaguely modern Athena machine, though perhaps I could add some more
symlinks to arch/.

From testing it with my account and the sipbtest account on several
machines of both architectures and versions of Athena, I have found
that in some configurations it fails with a message like
"AttributeError: java module 'sys' has no attribute 'modules'".  I
haven't quite managed to track down what is causing this; if you see
this and have any ideas,  please let me know.

Also, jython depends on caching some sort of index that it generates
about every Java jar you use (including the jython jar itself); I set
this to be in /tmp/$USER-jython-cache, which does unfortunately mean
that the first time you run jython on a new machine after /tmp has
been cleared it takes a while to start up.  I will probably provide an
environment variable that you can set, which will make the cache store
things in $JYTHON_CACHE/arch/@sys/cache or something.  Maybe try to
stick the JDK version in the path too.  Suggestions welcome.

--dave

--
David Glasser | glasser@mit.edu | http://www.davidglasser.net/

home help back first fref pref prev next nref lref last post