So I have to assume that the PYTHONPATH environment variable contains the directory that you are trying to import from as well. For me, we have to explicitly add another directory to our pythonpath to ensure that all of the imports work correctly.
i'm kind of new to both python and webware. my understanding is that python interprets a directory in sys.path as the base directory for modules or packages, and that subdirectories would be treated as "sub-packages".
so if "...site-packages/" is in sys.path, and there is a class named FeStmtType this file:
.../site-packages/kidney/expenses/FeStmtType.py
...then that class could be imported with:
from kidney.expenses.FeStmtType import FeStmtType
...?
Perhaps try printing out os.environ from the test and the app server and see what is different.
=== from the command line:
os.environ:
{'HZ': '100', 'TERM': 'xterm', 'SHELL': '/bin/false', 'SHLVL': '1', 'OLDPWD': '/usr/local/webapps', 'PWD': '/usr/local/webapps/kidney', 'LOGNAME': 'webware', 'USER': 'webware', 'PATH': '/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games', 'MAIL': '/var/mail/webware', 'HOME': '/', '_': '/usr/bin/python'}
sys.path:
['/usr/local/webapps/kidney', '/usr/lib/python23.zip', '/usr/lib/python2.3', '/usr/lib/python2.3/plat-linux2', '/usr/lib/python2.3/lib-tk', '/usr/lib/python2.3/lib-dynload', '/usr/local/lib/python2.3/site-packages', '/usr/lib/python2.3/site-packages', '/usr/lib/python2.3/site-packages/Numeric', '/usr/lib/python2.3/site-packages/gtk-2.0', '/usr/lib/site-python']
=== from webware:
os.environ:
{'TERM': 'linux', 'SHELL': '/bin/bash', 'CONSOLE': '/dev/console', 'SHLVL': '3', 'RUNLEVEL': '2', 'PREVLEVEL': 'N', 'PWD': '/usr/local/webapps', 'USER': 'webware', 'runlevel': '2', 'PATH': '/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games', 'previous': 'N', 'HOME': '/home/webware', '_': '/usr/bin/python', 'INIT_VERSION': 'sysvinit-2.86'}
sys.path:
['', '/usr/local/Webware-0.8.1', '/usr/local/webapps', '/usr/lib/python23.zip', '/usr/lib/python2.3', '/usr/lib/python2.3/plat-linux2', '/usr/lib/python2.3/lib-tk', '/usr/lib/python2.3/lib-dynload', '/usr/local/lib/python2.3/site-packages', '/usr/lib/python2.3/site-packages', '/usr/lib/python2.3/site-packages/Numeric', '/usr/lib/python2.3/site-packages/gtk-2.0', '/usr/lib/site-python', '/usr/local/webapps/lib', '/usr/local/webapps/Cache/PSP']
------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
