Re: Spyce application config file issue

Bruce Webber <[email protected]>
Newsgroups gmane.comp.python.spyce.general
Message-ID <616AA388DC61C154840E2264@[192.168.1.100]>
--Jonathan Ellis <[email protected]> wrote:

> This is a fundamental effect of the mod_python architecture.  That is,
> since mod_python creates a certain number of long-running Python
> processes, the normal Python behavior is exhibited that for each "import
> foo" statement, foo.py is located once and its location cached for
> subsequent imports.
>
> Your options include, in order of increasing difficulty,
>
> 1) use the built-in Spyce server for development instead of apache +
> mod_python

Thanks, Jonathan.

So I could run apache + mod_python (port 80) for production, along with the 
built in Spyce server (port 8000) for development on the same server? This 
would be perfect.

(BTW, the reason I'm running mod_python is because I have Moin, along with 
static pages, and I could not get fast_cgi running under Apache.)

> 2) run a separate apache server for development
> 3) rather than using the built-in import, use the imp module to manually
> force the loading, each time, of the module you want
>
> -Jonathan
>
> On Fri, 24 Feb 2006 11:02:58 -0500, "Bruce Webber"
> <[email protected]> said:
>> 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.

[...]

>> 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.

[...]

--
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.