[Zope] Environment Variable
Michel Pelletier
michel@digicool.com
Thu, 20 Jan 2000 15:27:49 -0500
> -----Original Message-----
> From: Daniel G. Rusch [mailto:drusch@globalcrossing.com]
> Sent: Thursday, January 20, 2000 11:55 AM
> To: Phil Harris; zope@zope.org
> Subject: Re: [Zope] Environment Variable
>
>
> Hey all,
>
> I'm strecthing my area of expertise here, but I had our sys
> admin set an
> Environment Variable in etc/profile and a different
> Environment Variable
> in Apache. I don't seem to be able to access either.
> I've tried <dtml-var "REQUEST['varname']">, but that throws
> an KeyError.
> Any thoughts.
It looks like there is no generic DTML inteface to env variables, the
REQUEST obj does get some env vars but only those defined in the CGI
spec.
I suspect the easiest solution is to write an external method that
examines your environment.
import os
def getEnvVar(var):
return os.environ[var]
or something like that.
-Michel