
Hi-
This is most probably FAQ, but I swear I couldn't find it - please have mercy on a nevow/twisted newbie :)
If I make some changes in the python code for a nevow application, is there a way to refresh and test those changes without killing/restarting my twisted server?
Thanks.
--Jeff

On Wed, 30 Mar 2005 09:38:56 -0600, Jeffrey Kunce Jeffrey.Kunce@mdc.mo.gov wrote:
This is most probably FAQ, but I swear I couldn't find it - please have mercy on a nevow/twisted newbie :)
Here's the FAQ:
http://divmod.org/users/wiki.twistd/nevow/moin.cgi/FrequentlyAskedQuestions
And here's the start of a cookbook:
http://divmod.org/users/wiki.twistd/nevow/moin.cgi/CookBook
Dave Cook

I've also found this cookbook recipe for updating instances after reloading a module to be handy: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/160164
At the moment, I'm just going in via a manhole and manually reloading modules when I change them in development. I'm sure this can be automated, though.
This route has the advantage that you don't have to restructure your code into non-objects in the way that the cookbook suggests.
Kevin

Kevin Dangoor dangoor@gmail.com writes:
I've also found this cookbook recipe for updating instances after reloading a module to be handy: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/160164
This is the sort of thing I wrote it for!
In practice, I'm finding a few issues (mostly to do with upgrading state of instances).
At the moment, I'm just going in via a manhole and manually reloading modules when I change them in development. I'm sure this can be automated, though.
Hmm, manhole. I should probably try that.
This route has the advantage that you don't have to restructure your code into non-objects in the way that the cookbook suggests.
I don't understand this comment, though?
Cheers, mwh

On Mar 31, 2005 11:50 AM, Michael Hudson mwh@python.net wrote:
Kevin Dangoor dangoor@gmail.com writes:
This route has the advantage that you don't have to restructure your code into non-objects in the way that the cookbook suggests.
I don't understand this comment, though?
Err... Sorry... The word "cookbook" was overloaded in this context. Cookbook above was referring to http://divmod.org/users/wiki.twistd/nevow/moin.cgi/CookBook
In there, there is a suggestion to move all of your stan rendering into functions so you can just reload the module.
Kevin

Kevin Dangoor dangoor@gmail.com writes:
On Mar 31, 2005 11:50 AM, Michael Hudson mwh@python.net wrote:
Kevin Dangoor dangoor@gmail.com writes:
This route has the advantage that you don't have to restructure your code into non-objects in the way that the cookbook suggests.
I don't understand this comment, though?
Err... Sorry... The word "cookbook" was overloaded in this context. Cookbook above was referring to http://divmod.org/users/wiki.twistd/nevow/moin.cgi/CookBook
In there, there is a suggestion to move all of your stan rendering into functions so you can just reload the module.
Ah! Yes, that make sense now :)
Glad you like my recipe (I hear that it's in the newly released Python Cookbook 2e, but haven't seen it myself yet).
Cheers, mwh
participants (4)
-
Dave Cook
-
Jeffrey Kunce
-
Kevin Dangoor
-
Michael Hudson