In ye olde barbaric days, one thing was handy: templates and python
scripts reloaded just fine in debug mode and a refresh.txt
in your
product went a long way to not having to restart your zope too often.
Zcml only loads on startup, so a change there means a zope restart, probably nothing to be done about that. But I seem to be restarting zope for just about every single little python change.
So I asked around on the mailinglist last month: on the current strategies for preventing too many zope restarts during development? I was bound to miss a few tips and tricks otherwise :-) So here's a summary.
=
instead of
==
, head-slapping stuff like that. Catch it before restarting zope :-)Martin Aspeli provided the full list of rules on what requires a restart:
Those plone mailing lists sure are great :-)
Tags: plone
My name is Reinout van Rees and I work a lot with Python (programming language) and Django (website framework). I live in The Netherlands and I'm happily married to Annie van Rees-Kooiman.
Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):
https://bugs.launchpad.net/grok/+bug/213269
/@@code_reload didn't work for me for a portlet renderer, but moving the renderer class definition to a separate file and importing the renderer in the file referenced by the zcml worked.
I guess it has to do with ZCA registration.
But in most cases it works well (and saves time).
bin/zeo_client_2 debug < mytest.py
where mytest.py might be:
from mysite.theme.setuphandlers import SiteSetup
cp = SiteSetup()
cp.MyMethodToTest(app.plonesite)
... then maybe evolve it into a more formal unit or doc test later ...
Luckily I like to do it :-)
I've recently made the decision to increase the frequency with which I blog (and not only on plone, so not all of it will show up on planet.plone.org). Your positive feedback helps a lot in strengthening that resolve.
It also means that I'm also inviting negative (or "improvement-oriented") feedback in order to improve myself. I really really want to learn.
mailing lists are really helpful, and all the plone people is kicking ass, but you rule, and i propose you as one of the best plone reporter out there!
hope you'll have a great 2008 and to meet you soon!
Maurizio