[Twisted-Python] twisted web question

Greg Lappen greg at paperfree.net
Tue Dec 16 10:05:26 EST 2003


Just thought of something else:

If I use mktap and an .rpy script, I cannot install any other protocol 
factory.  My server listens on one port to implement a proprietary 
TCP/IP protocol, and another port to provide a web interface.  Am I 
right that I cannot set this up using mktap?

Greg
On Dec 16, 2003, at 9:33 AM, Philippe Lafoucrière wrote:

> I had this problem and pointed up to ml some weeks ago... No response 
> for
> that. I just corrected it by using a TAP file instead of creating the
> application in my code.
> Try :
>
> ==========================================================
> mktap  web --resource-script=index.rpy
> ==========================================================
>
> then start it with :
>
>
> ==========================================================
> PYTHONPATH=$PYTHONPATH:$PWD/MyWovenPages twistd -nf web.tap
> ==========================================================
>
> Here is my index.rpy file :
>
> ==========================================================
> # This file is used for debug. It allows to reload the whole 
> application
> # and test changes directly.
>
> import MyWovenPages
>
>
> ## Comment out this line when finished debugging
> reload(MyWovenPages)
>
> # We must have a 'resource'. We take the index page as the default 
> resource.
> resource = MyWovenPages.MyWovenPages_Index()
> ==========================================================
>
> hope this helped
>
> --
> Philippe
>
>
> On Tuesday 16 December 2003 00:12, Greg Lappen wrote:
>> I am playing with some twisted-web and woven stuff.
>>
>> I noticed that whenever I get an error page, the server no longer
>> handles requests.
>>
>> Is this the intended behavior?
>>
>> Greg
>>
>>
>> _______________________________________________
>> Twisted-Python mailing list
>> Twisted-Python at twistedmatrix.com
>> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>






More information about the Twisted-Python mailing list