From: Harlan H. <ha...@ot...> - 2001-05-18 23:08:41
|
> Date: Fri, 18 May 2001 10:44:58 -0400 > From: D-Man <ds...@ri...> > To: jyt...@li... > Subject: Re: [Jython-users] access to .py's in jars > > On Thu, May 17, 2001 at 07:26:36PM -0700, Harlan Hile wrote: > ... > | what i want to do now is bundle it all into a jar file... so, include all > | my com/otelnet/.class files, and then include a mymod.py at the root, or a > | mymod$py.class at the root, so when I have the jar in the classpath, i can > | import mymod > ... > | is there a way to do this? > > Use 'jythonc --jar' to build the jar file. Putting .py files into a > jar doesn't help at all. You need to have java bytecodes (.class) > files in the jar. You also need all the jython internals stuff that > your python code depends on in the jar as well (or any jar as long as > it is in the CLASSPATH). jythonc compiles a .py into a real java class, right? I dont want a real java class.. it doesnt need to be accessible from java, only from python. this is why i originally included the generated file$py.class (which i assume is similar to cpython's .pyc files), but that didnt work. does jpython only look for real java classes in jar files, and not python class files? If that is the case and i do need to generate a real java class, what is the minimum i can put into the @sig tags so it works? should everything be java.lang.Object, or org.python.core.PyObject...? or is there a bundling mechanism other than jar that works with jython? ---- ha...@ot... x293 |