From: Humbel O. <Otm...@bi...> - 2001-09-20 13:33:32
|
[ Kevin McNamee ] [snip] > test2.py: > --------- > import sys > sys.add_package("com.ericsson.test1") > import com.ericsson.test1 > AttributeError: java package 'com.ericsson.test1' has no=20 > attribute 'test1' > I wonder if calling the add_package procedure is simply allowing the > import statement to succeed without providing any real connection to > another jar file. test1.jar might as well not exist. This is just a guess (I'm not an expert). Maybe try, in test2.py: sys.add_package("com.ericsson.test1") from com.ericsson.test1 import test1 instead of: sys.add_package("com.ericsson.test1") import com.ericsson.test1 The first is my absolute favourite style of importing, and I almost ever am successful with it. Good luck ! Oti. |