[Zope] Simple Question about PATH environment variable

Paul Merrill paul_a_merrill@yahoo.com.au
Thu, 06 Dec 2001 23:33:09 +1100


Dear All,

I'm doing some content creation for a Zope site and have run into a 
problem with the PATH variable but need some help.

Our system admin has installed zope in the /usr/share/Zope directory and 
created an init script on the Mandrake System it runs on
to start Zope when the system boots. All very standard and works fine. I 
can access the site with the /manage extension to the url.

I have installed DocumentLibrary1.0b3, as downloaded from www.zope.org, 
and downloaded wvWare from www.wvWare.com so
that I can search MSWord files that I stick in the library. wvWare seems 
to work fine if I login to the system with ssh and execute wvWare from 
the bash command prompt in my home directory.

Now, wvWare is located in /usr/local/bin/wvWare and I when I try and 
search for text that I know is in one of the files, nothing is found. I 
have a similar install of Zope on my home PC and it works there BUT at 
home I start Zope from my bash shell (./start &), thus 'which wvWare' 
returns /usr/local/bin/wvWare because the PATH contains /usr/local/bin.

I'm thinking that for some reason the production site cannot find wvWare 
in the /usr/local/bin directory because the PATH environment variable 
has not been set properly since the Zope server is started at system 
startup and not from a user login.

Now for the questions.

Can someone give me a dtml or python snip of code to dump the PATH 
variable to see what it is? Assuming it's wrong, where would one modify 
the PATH variable so that it could find the wvWare executable? 
Alternatively, would it make more sense to modify the DocumentLibrary 
code so that the total path /usr/local/bin/wvWare is referenced from Python?

Finally, lets assume nothing above works. What I'd like to do is add 
some debugging code to the Python code to dump out the input parameters 
and output results. What's the best approach given that starting Zope 
from the python debugger is a problem since the site is already running? 
Is it possible to create a trace file in /tmp that I could shoot some 
text to and then SSH to the machine and "moreing" the /tmp file? I was 
thinking of just modifying the appropriate .py file in DocumentLibrary, 
deleting .pyc and letting Zope figure out the rest (like re-compiling) 
when I referenced the code.

Ideas please would be appreciated.

Paul