On Wednesday 02 October 2002 17:53, Dilley, Hara wrote:
when I was calling the function from a shell Sorry?! What You mean "calling a function from a shell"?
it was importing DCOracle2 from the /usr/lib/python calling it from within zope is importing DCOracle2 from $ZOPE_HOME/bin/python Oh, that's *slow*. And why in this way? Or I something missunderstood?
It appears that these two copies of DCOracle2 are different. So I solved the problem by copying DCOracle2 from the standalone python into $ZOPE_HOME/lib/python2.1/site-packages. So far it is working. I hope this will not be a problem down the road. I would be very interested to understand why these two copies behave differently?? Are You new to the Zope? Well... Zope does not use interpreter from the /usr/bin/python (or /usr/local/bin/python) and all the stuff in the /usr/lib/python/* but uses it's own interpteter. So You should setup DCOracle2 for the interpter which Zope uses.
First, that you have installed in wrong way, and probably something missed here. Just run the following: cd /where/your/unpacked/DCOracle2 $zope_home/bin/python setup.py install Then (this *I* did, but You can do that in other way) just put all the Oracle environment variables into the script which starts the Zope. It might be $zope_home/start, but better some wrapper in /etc/init.d/zope or whatever. This is the common Oracle Client env. variables in case I've installed it into the root as "/oracle": ORACLE_HOME=/oracle NLS_LANG=AMERICAN_AMERICA.LT8MSWIN921 ORACLE_SID=DVLP PATH=$PATH:/oracle/bin LD_LIBRARY_PATH=/oracle/lib export ORACLE_HOME export NLS_LANG export ORACLE_SID export PATH export LD_LIBRARY_PATH
Thanks for your response Bogdan, You welcome, HTH.
P.S. Windows-depending problems I don't know and wouldn't. P.P.S. Matt might bite me for the adding Oracle env. into the Zope startscript. :D -- Regards, Bogdan Anybody who doesn't cut his speed at the sight of a police car is probably parked.