ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> Jython-users
Jython-users
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved