[Twisted-Python] How to split a huge 'service' class.

2009-03-25 Thread Peter Cai
Hi all, I am writing a network application based on twisted and following the "finger service" tutorial in twisted document. I wrote multiple protocols classes and a single service class. This allows client to choose the most suitable protocol to access services. My problem is : the service class

Re: [Twisted-Python] db connections

2009-03-25 Thread Pet
On Wed, Mar 25, 2009 at 10:22 AM, Pet wrote: > On Tue, Mar 24, 2009 at 6:10 PM, Alvin Delagon wrote: >> Something like this: >> >> from twisted.protocols import basic >> from twisted.internet import protocol, reactor >> from twisted.enterprise import adbapi >> >> class MyProtocol(basic.LineReceiv

Re: [Twisted-Python] db connections

2009-03-25 Thread Pet
On Tue, Mar 24, 2009 at 6:10 PM, Alvin Delagon wrote: > Something like this: > > from twisted.protocols import basic > from twisted.internet import protocol, reactor > from twisted.enterprise import adbapi > > class MyProtocol(basic.LineReceiver): >     def __init__(self): >     pass > >     d