[Twisted-Python] twisted.web and MySQLdb

Donovan Preston dp at twistedmatrix.com
Tue Oct 28 22:48:37 EST 2003


On Oct 28, 2003, at 10:06 PM, James Y Knight wrote:

> You should just not use the whole pickled app/saving state thing. Then 
> you don't have to worry about this stuff at all. In addition the next 
> person who comes along and wants to debug something will thank you 
> profusely when he doesn't have to sit there and ponder "gee, I wonder 
> what parameters the last person gave to mktap, cause I really would 
> like to startup a second copy of that app on another port. (or from a 
> different directory, with a new file type handler, whatever)...".
>
> I recommend configuring your webserver with python code and starting 
> it with twistd -y. Perhaps not ideal but certainly better than the 
> whole tap mess.

Now that freeform is done in quotient and passing existing object 
references to formless methods is next up on the plate (and the 
implementation is far cleaner than the old quotient 
formless/configure/webform) we can get started on writing COIL sometime 
in the near future so you can configure pickled application instances 
in the tap using a nice web ui. Having a good configuration interface 
which allows you to load the serialized application, reconfigure it, 
and serialize it back out to disk has always been an integral part of 
the tap idea that has never actually been implemented properly yet.

The "I wonder what parameters were used" idea is pretty interesting, 
though. It would be trivial to serialize the command-line options that 
were given to each invocation of mktap along with everything else so at 
the very least we could show you which command line options were used 
to build the application in the first place.

dp





More information about the Twisted-Python mailing list