This should be looked into...it would provide a way for us to support import * without doing brute-force searches every time or adding const_missing hooks. Anyone care to have a look at it?

-------- Original Message --------
Subject: Jython's package caching mechanism roughly extracted
Date: Fri, 13 Jul 2007 22:56:55 -0400
From: Frank Wierzbicki <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED], Charles Oliver Nutter <[EMAIL PROTECTED]>


Hi Charles (and jvm-languages),

I while back you had requested that we (the Jython folks) try to
extract out the caching mechanism that Jython uses.  I've done a rough
extraction (basically I replaced all of the PyList and other
pythonisms with Java List and other Java-isms and removed any links
into Jython's core.  I've dummied out the class representing a
JavaPackage.  This is very rough and is in no way threadsafe or for
that matter safe for any purpose :) -- but it does create the cache
files for jars the way Jython does.  To try it out check it out from
here:

https://jython.svn.sourceforge.net/svnroot/jython/trunk/sandbox/wierzbicki/packagecache

It has a simple ant file that builds the java classes.  It also has
two test directories, one for jython and one for jruby (src/jython and
src/jruby) with a test.py and test.rb.  Both test directories contain
an empty "jars" directory.   If you put some jars in the "jars"
directory and run the tests a "cachedir" gets generated and cache
files are produced from the jars.  I haven't gotten around to testing
the mechanism for actually using the cache -- so that part could be
completely broken, but the cache files produced from the jars are
exactly the same (at least for the handful of jars that I studied) as
those produced by Jython.

-Frank

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM Languages" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---


---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to