Hey<br><br><div class="gmail_quote">On Mon, Jun 9, 2008 at 8:08 PM, Martin Aspeli &lt;<a href="mailto:optilude@gmx.net">optilude@gmx.net</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">Peter Bengtsson wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I&#39;ve managed to hack zc.zope3recipes.ctl to accept another program<br>
called &quot;autorestart&quot;. You run it like this::<br>
<br>
&nbsp;$ ./bin/zopectl autorestart src/mymodule<br>
<br>
It will then start an inotify watcher to watch all .py files (except<br>
tests) and .pt files that define a macro and whenever it spots a<br>
change it restarts Zope. <br>
</blockquote>
<br></div>
Why not just use the support built into paste? If you use Paste to serve a WSGI application, you can just do:<br>
<br>
$ paster serve --reload myprogram.ini<br>
<br>
This is what things like Pylons, TurboGears (I think) and Repoze are doing, and you get it for free. I&#39;m pretty sure Philipp already experimented with this somewhere, even.</blockquote><div><br><br>I didn&#39;t have time to check it out but do you know what &quot;--reloads&quot; means here? Will it actually grok everything again as in a full restart or will it just use the python built-in reload() on the file that was changed?<br>
If it is reload(), I am not sure if this is going to work 100% since you&#39;d need to tell the global registries to unregister/register everything again.<br><br>Anyway, I will take a look at that.<br><br>Regards,<br>Fernando<br>
</div></div>