[Twisted-web] Livepage, ClientHandle and context

Valentino Volonghi aka Dialtone dialtone at divmod.com
Mon May 30 16:30:59 MDT 2005

Thomas HERVE wrote:

>I resolved my problem by creating my ClientHandle and ClientHandleFactory
>implementations, the ClientHandle saving the context at its creation (pretty
>easy, but I would have found it cleaner if clientHandleFactory was a class
>variable of LivePage, Input and Output, and not a module global). Thus, the
>i18nconfig remains in context.
>My question is : is this choice good, or is there a good reason for ClientHandle
>not to keep track of the context ? If not, wouldn't it be better to save context
>in ClientHandle (it would useful for others things, getting session for example)
Or you can use closures and have the outer context stored in the closure
hence you will be able to use it
in the handler without requiring anything from the livepage.flt context

Valentino Volonghi aka Dialtone
Now Running MacOSX 10.4.1
Blog: http://vvolonghi.blogspot.com

More information about the Twisted-web mailing list