<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: [Twisted-Python] How do I get at the Application object (using twistd)</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>&gt; &gt;Twisted documentation says I can manually save my</FONT>
<BR><FONT SIZE=2>&gt; &gt;application by using</FONT>
<BR><FONT SIZE=2>&gt; &gt;the&nbsp; 'save' method on the Application object. That's fine if I'm</FONT>
<BR><FONT SIZE=2>&gt; &gt;creating the&nbsp; Application object myself, but how do I get at this </FONT>
<BR><FONT SIZE=2>&gt; &gt;object if I'm using&nbsp; twistd to start it?</FONT>
<BR><FONT SIZE=2>&gt; &gt;</FONT>
<BR><FONT SIZE=2>&gt; &gt;&nbsp; ...</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp; The Application is the wrong place to serialize updated DNS</FONT>
<BR><FONT SIZE=2>&gt; records.&nbsp; The Application is for application configuration </FONT>
<BR><FONT SIZE=2>&gt; (what user should it run as?&nbsp; what services should it </FONT>
<BR><FONT SIZE=2>&gt; provide?).&nbsp; Application data should be serialized elsewhere.</FONT>
<BR><FONT SIZE=2>&gt;&nbsp; Jp</FONT>
</P>

<P><FONT SIZE=2>Hmmm... I take your point. But...</FONT>
<BR><FONT SIZE=2>I was looking at doing it at the Application level because that</FONT>
<BR><FONT SIZE=2>seemed to fit with how twisted.names works. The full configuration</FONT>
<BR><FONT SIZE=2>of the DNS server, including all the name&lt;-&gt;address mapping, is</FONT>
<BR><FONT SIZE=2>in the dns.tap file. When the server is stopped, this is saved</FONT>
<BR><FONT SIZE=2>in the dns-shutdown.tap file. So, if I apply some updates, then</FONT>
<BR><FONT SIZE=2>shut the server down, I can restart the server complete with</FONT>
<BR><FONT SIZE=2>updates by using dns-shutdown.tap. What I wanted to do was utilize</FONT>
<BR><FONT SIZE=2>that mechanism rather than do my own serializing, and have to </FONT>
<BR><FONT SIZE=2>manage two configuration files.</FONT>
<BR><FONT SIZE=2>Perhaps the question changes to:</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp; How do I separate the application data (DNS config) from</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp; the rest of the application?</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp; How do I start the application using that separate data?</FONT>
</P>

<P><FONT SIZE=2>It looked so elegant just to re-use the shutdown code!</FONT>
</P>

<P><FONT SIZE=2>Jeff</FONT>
</P>

</BODY>
</HTML>