<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Sep 9, 2010, at 4:27 PM, Einar S. Idsų wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi Glyph, and thank you for your thorough and very helpful response. :)<br><br>On Wed, Sep 8, 2010 at 9:47 PM, Glyph Lefkowitz &lt;<a href="mailto:glyph@twistedmatrix.com">glyph@twistedmatrix.com</a>&gt; wrote:<br><blockquote type="cite">It sounds like this is a pretty trivial application of the Publish/Subscribe<br></blockquote><blockquote type="cite">pattern (or perhaps the Observer) pattern.<br></blockquote>(...)<br><blockquote type="cite"> Add one general-purpose<br></blockquote><blockquote type="cite">"list of observers that want to be notified (when X happens)" argument.<br></blockquote><blockquote type="cite"> Then when your getProcessOutput() finishes, just do 'for something in<br></blockquote><blockquote type="cite">self.observers: something.youJustGotServerStatus(newServerStatus)'.<br></blockquote>Yes! Perfect! That sounds like it's exactly what I need, thank you :)<font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#144FAE"><br></font></font></div></blockquote><div><br></div><div>Great, glad to help :).</div><br><blockquote type="cite"><div><blockquote type="cite">It<br></blockquote><blockquote type="cite">usually makes sense to define an interface with a couple of interesting<br></blockquote><blockquote type="cite">methods when you do this, so that you can have more methods.<br></blockquote>Interfaces scare me, and I've been doing my best to avoid them in my<br>application. The primary reason being that I am the only developer, so<br>as long as I know what I'm doing I'll be alright. Although I'm not so<br>sure that I actually do...<br></div></blockquote><div><br></div><div>There are some cool implementation things you can do with interfaces, but they're a little obscure and you shouldn't worry about them. &nbsp;It's most helpful to think of interfaces as just expanded / shared docstrings for things that are shared among many classes.</div><br><blockquote type="cite"><div><blockquote type="cite">Please, please do not use t.p.hook. &nbsp;I hope that we delete it one day.<br></blockquote>Thanks for the advice. I'll stay away.<font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#144FAE"><br></font></font></div></blockquote><div><br></div><div>Even greater.</div><br><blockquote type="cite"><div><blockquote type="cite"><blockquote type="cite">I hope this was somewhat comprehensible, and that there is an elegant<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">solution out there. :)<br></blockquote></blockquote><blockquote type="cite">Well, if my answer answers your question, then yes :).<br></blockquote>It certainly does, and it is much appreciated. I'll just pop out on<br>Google for a few minutes to find some examples, and will get right<br>back to coding my app. Thanks again for taking the time to help a<br>novice out :)<br></div></blockquote></div><br><div>It's always nice to have the help be appreciated. &nbsp;Good luck!</div></body></html>