Spyce application config file issue

Bruce Webber <[email protected]>
Newsgroups gmane.comp.python.spyce.general
Message-ID <99DFB78D40FBC8486681C147@[10.9.30.130]>
I've created a Spyce application at work. It's relatively simple; it 
displays a table listing current projects, and provides a form for adding 
new projects and editing current projects.

The application is running on a Windows 2000 server, running Apache 2.0.55 
and Python 2.4. The Spyce version is 2.0.3.1. I've configured it to use 
mod_python (version 3.2.5b). The project information is stored in an Oracle 
9i database - I'm using cx_Oracle 4.1 to connect to Oracle.

I have two versions of the application on the server, one for production 
and one for development. Each version has a configuration file called 
isdPrjConfig.py which contains the name of the database, id, password, and 
other environment-specific settings. (There are files for each environment 
- isdPrjConfig.dev.py and isdPrjConfig.prod.py - and the appropriate file 
is copied over isdPrjConfig.py.)

The problem is that one of these configuration files gets cached and is 
used for both environments. If I restart Apache, the first config file to 
be accessed is then used for both directories.

I'm able to find information on Apache caching, but since these files are 
in different folders, I don't think that applies.

Here are some more details.

-----
>From httpd.conf:

# Spyce via mod_python (added by Bruce Webber, 2006-02-02)
<IfModule mod_python.c>
      AddHandler python-program .spy
      PythonHandler run_spyceModpy::spyceMain
      PythonPath "sys.path+[r'c:/spyce']"
      #PythonOption SPYCE_CONFIG "/mydir/spyceconf.py"
      #PythonOptimize On
</IfModule>
ScriptInterpreterSource registry

# ISD Project Info application (added by Bruce Webber, 2006-02-03)
Alias /isdprjinfo/ "c:/spycesites/isdprjinfo/www/"
<Directory "c:/spycesites/isdprjinfo/www/">
    Options Indexes
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

# ISD Project Info application - Development (added by Bruce Webber, 
2006-02-16)
Alias /isdprjinfo-dev/ "c:/spycesites/isdprjinfo-dev/www/"
<Directory "c:/spycesites/isdprjinfo-dev/www/">
    Options Indexes
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

-----
The production isdPrjConfig.py file (with sensitive details changed):

# database properties
DB_NAME = 'proddatabase'
DB_USER = 'user'
DB_PSWD = 'password'

# if false, the user ID is not checked (for development)
CHECK_USER_ID = True

# if true, the SQL and exception details will be displayed
SQL_DEBUG = False

-----

If more information is needed, or if I should direct this question to 
another list, please let me know.

Thanks,

-- 
Bruce Webber
[email protected]
http://brucewebber.us


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.