[Zope] DCOracle2

Bo M. Maryniuck b.maryniuk@forbis.lt
Wed, 2 Oct 2002 18:22:00 +0200


On Wednesday 02 October 2002 17:53, Dilley, Hara wrote:
> when I was calling the function from a shell=20
Sorry?! What You mean "calling a function from a shell"?

> it was importing DCOracle2
> from the /usr/lib/python=0D calling it from within zope is importing
> DCOracle2 from $ZOPE_HOME/bin/python=20
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 f=
ar
> it is working. I hope this will not be a problem down the road.  I woul=
d be
> very interested to  understand why these two copies behave differently?=
?=20
Are You new to the Zope? Well... Zope does not use interpreter from the=20
/usr/bin/python (or /usr/local/bin/python) and all the stuff in the=20
/usr/lib/python/* but uses it's own interpteter. So You should setup=20
DCOracle2 for the interpter which Zope uses.

First, that you have installed in wrong way, and probably something misse=
d=20
here. Just run the following:

=09cd /where/your/unpacked/DCOracle2
=09$zope_home/bin/python setup.py install

Then (this *I* did, but You can do that in other way) just put all the Or=
acle=20
environment variables into the script which starts the Zope. It might be=20
$zope_home/start, but better some wrapper in /etc/init.d/zope or whatever=
=2E

This is the common Oracle Client env. variables in case I've installed it=
 into=20
the root as "/oracle":

ORACLE_HOME=3D/oracle
NLS_LANG=3DAMERICAN_AMERICA.LT8MSWIN921
ORACLE_SID=3DDVLP
PATH=3D$PATH:/oracle/bin
LD_LIBRARY_PATH=3D/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=20
startscript. :D

--=20
Regards, Bogdan

Anybody who doesn't cut his speed at the sight of a police car is
probably parked.