On Fri, Aug 28, 2009 at 2:50 PM, Joey Jarosz<joey@...> wrote:
> I have Jython embedded in my application. I have some users who want to not
> pass the raw text of a python script around to some other users, but rather
> would prefer to only give them the $py.class file generated by Jython when a
> py file is loaded. Essentially they want an execfile() equivalent that can
> accept a $py.class file instead of a .py file.
I believe if you have the class object, you can call
org.python.core.CodeLoader.loadCode to turn the class into a PyCode
object. Once you have that PyCode, you can call
org.python.core.Py.runCode to run it. Is that what you're after?