Re: [Twisted-Python] Doubt regarding registerAdapter in sshsimpleserver.py

2011-06-24 Thread Anshul Singhle
Thanks. That clears it. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] Plugin Example - review appreciated

2011-06-24 Thread Thorne, Stephen
On Fri, Jun 24, 2011 at 19:29, wrote: >   class SetupClass(service.Service): >       def __init__(self, reactor): >           self._reactor = reactor > >       def startService(self): >           self._startupCall = self._reactor.callLater(3, self.done) Thanks Jean-Paul, I've taken the first su

Re: [Twisted-Python] Plugin Example - review appreciated

2011-06-24 Thread exarkun
On 05:06 pm, step...@thorne.id.au wrote: On Fri, Jun 24, 2011 at 18:23, wrote: Using the global reactor makes code less easily testable. �This isn't specific to plugins, you should avoid the global reactor in all your Twisted-using code. �Accept it as a parameter instead. Ah, I did not do th

Re: [Twisted-Python] Plugin Example - review appreciated

2011-06-24 Thread Thorne, Stephen
On Fri, Jun 24, 2011 at 18:23, wrote: > Using the global reactor makes code less easily testable.  This isn't > specific to plugins, you should avoid the global reactor in all your > Twisted-using code.  Accept it as a parameter instead. Ah, I did not do this successfully in my rewrite. I'd be i

Re: [Twisted-Python] Plugin Example - review appreciated

2011-06-24 Thread exarkun
On 03:41 pm, robert.wat...@gmail.com wrote: >On Tue, Jun 21, 2011 at 5:32 PM, wrote: >> >>Don't define Options or makeService in the dropin file. The system will perform better if there is less code in the dropin file (or imported by the dropin file). There are some ideas to add an optimizatio

Re: [Twisted-Python] Doubt regarding registerAdapter in sshsimpleserver.py

2011-06-24 Thread exarkun
On 12:37 am, anshul.sing...@gmail.com wrote: >Hi, >I'm a Twisted newbie and I'm working on a custom ssh daemon for serving >git. >I happened to read one of the example files sshsimpleserver.py at * >http://twistedmatrix.com/projects/conch/documentation/examples/* . At >line >93 ExampleSession is

Re: [Twisted-Python] Plugin Example - review appreciated

2011-06-24 Thread R M Waters
On Tue, Jun 21, 2011 at 5:32 PM, wrote: > > Don't define Options or makeService in the dropin file. > > Use twisted.application.service.ServiceMaker instead of implementing > your own. > > Don't use the global reactor in SetupService. > > > Would you please elaborate on the three items above? Mo