On 17 March 2003, David Ascher said:
> Has anyone come up with a way to get quixote modules to get reloaded when
> they've been modified when running under mod_python?
I have been down that road several times in the past, and it *always*
ended in tears. Module reloading is a convenient little hack in an
interactive interpreter, but in a real-world long-lived process, it is
always doomed to failure. Always. Unfortunately, it's been several
years since I bashed my head against this particular brick wall, so I
don't remember the details. But I tried a *lot* of tricks, and they all
came to nothing in the end.
In other words: give up. You have better things to spend your time on.
(For the record, my preferred mode of operation is to use a CGI script
when I'm actively developing code, so that the application reflects code
changes immediately -- for small apps, I can live with the sluggish
response time. Then I use SCGI for extensive functional testing and of
course for real-world deployment.)
(Here's a loopy idea: put code in your Quixote that hunts down the
process that needs to be killed to restart: os.getpid() for SCGI, maybe
the same for mod_python, I dunno. Then add a "restart" link to your app
for debugging. It might work.)
Greg
--
Greg Ward - software developer gward@mems-exchange.org
MEMS Exchange http://www.mems-exchange.org