>So far, I can't find info on how to get at the underlying Apache
>Request instance from within Spyce. I want to find the req.user to see
>what the person logged in as, for example. Anyone know how to do this?
Well, it's possible, but you're not "supposed" to do that. The whole
idea is that Spyce has an abstraction layer that hides from you (as much
as possible) the differences between each of the different possible
configurations: mod_python, cgi, proxy server, etc. This way you can
change the configuration without changing the scripts.
Now, technically, it is possible to get at the underlying mod_python
Apache request object. First you need to go through one of the modules.
Each module has a reference to a wrapper object, where all the various
internal API (used by modules) are defined and implemented. This common
API is defined in terms of a set of functions that are implemented
equivalently (and efficiently) across a number of different possible
The Apache request object would then be:
where: 'request' is the request Spyce module, '_api' is the API wrapper,
'_request' is the mod_python-specific spyce "driver" and '_in' is the
mod_python object. These variables were never meant to be accessed
directly from the script, so the names may change. It's also not
guaranteed that the '_request' will remain the same across different
configurations. For example, it may not have an '_in' field.
Thus, the best way to go about accessing functionality from an
underlying implementation is to add it to the internal API, and access
it via some module. Is the user information that you need not available
within the environment dictionary via the Spyce request module? If not,
please state what kind of functionality you are interested in.
All the best,