<html><body>On 01:34 pm, exarkun@divmod.com wrote:<br />&gt;On Mon, 09 Apr 2007 15:21:50 +0200, Roland Hedberg <br />&gt;&lt;roland.hedberg@adm.umu.se&gt; wrote:<br /><br />&gt;&gt;Is there anyway by which I can tell mktap to "forget" about the<br />&gt;&gt;sleepycat database or ... ?<br /><br />&gt;Two possibilities jump out at me:<br />&gt;<br />&gt; &#160;- Don't invoke the initialization code of that package in makeService,<br />&gt; &#160; &#160;wait until the startService method of the service you create is called,<br />&gt; &#160; &#160;and invoke it then. &#160;This will prevent the DB from being opened until<br />&gt; &#160; &#160;the application is actually started (ie, when twistd is run).<br /><br />This has the added advantage of working with the --uid and --gid options of twistd as well. &#160;If your objects are created as the service is created, they will be created (and the database opened) as root. &#160;You almost always want to wait until the service actually starts up, i.e. until Twisted has already daemonized, already shed privileges, to actually open files and databases.<br /><br />&gt; &#160;- Don't use mktap, just use twistd<br /><br />There is also probably no reason to use mktap for a case like this any more though, and there are no tests to ensure that pickles remain compatible across Twisted or Python versions. &#160;Not only are there no automated tests, but as far as I know nobody is still using taps as a method persisting configuration any more, so it is unlikely there is any mechanism for us to notice if pickle compatibility is broken.<br /><br />In other words, you're probably better off taking both of JP's suggestions rather than just one.</body></html>