Re: [Jython-users] Problem with import when using a jar in python.path
by Robert W. Bill other posts by this author
Oct 28 2001 2:03AM messages near this date
Re: [Jython-users] Problem with import when using a jar in python.path
|
[Jython-users] Problem with import when using a jar in python.path
Hi Matt,
On Sat, 27 Oct 2001 Matt_Conway@[...].com wrote:
> On 10/27/2001 02:19:07 AM jython-users-admin wrote:
> >
> > java -Dpython.home=/export/cvs/jython >
> Do you have a Lib directory in your python home? If you do, you could be
> getting pawt from there.
DOH! I'm sure you've already guessed the answer here :)
Yes, I forgot to hide Lib before testing, but I was also lazy in reading
the debugging output because of some assumptions made based on the
imp.java source.
The loadFromZipFile method in imp.java checks for packages (__init__.py),
which only makes sense if it traverses packages. After looking closer, it
seems that it does not correctly traverse packages in archives. This makes
"import pawt.colors" and other packages stored in archive files not work
at the present time.
> > One guess might be that you have a package that is missing its
> __init__.py
> > file.
>
> Hmm, There is a __init__.py in the pawt directory, but none in the Lib
> directory (just a __future__.py)
> Could that be the cause?
Only packages need __init__.py (those directories that are
subdirectories of sys.path entries. e.g. Lib/pawt). So Lib itself doesn't
need an __init__.py.
> Windows 2000SP2
> java full version "1.3.1_01a"
>
> Any ideas?
Wait for a patch <g>
-robert
_______________________________________________
Jython-users mailing list
Jython-users@[...].net
https://lists.sourceforge.net/lists/listinfo/jython-users
Thread:
Robert W. Bill
|