Hi,
I'm starting a project where I plan to use twisted for the first time. I'd
like to practice using ipython and after looking around I found a recepe [1]
by Metthew Scott and a comment by Bob Ippolito on that recepe that suggests
a different approch [2].
In the ipython manual there's a referenc
Hi,
I'm new to twisted and I have started to write a new protocol with a TCP
client and server.
In my protocol, a client should be able to connect to 2 servers
(master/slave node - only the master accepts connection).
The client should try to connect to server1. If it fails, try to connect
to serv
You could probably generalize and simplify by using a collections.deque of
hosts/ports and using the rotate() method before each reactor.connectTCP.
Also, no need for multiple reactor imports---one at the top of the code is
fine. Note that if the connection is "lost" in a non-clean fashion, you m
On 03:10 am, screwt...@froup.com wrote:
>>Futures may call their callbacks in any thread. So the line:
>> > d.fail(e)
>>
>>must instead be something like:
>>
>> reactor.callFromThread(d.errback, e)
>
>PEP 3148 says:
># Added callables are called in the order that th
On Tue, 2011-01-11 at 11:17 +0100, benjamin.bertr...@lfv.se wrote:
> Any comments is welcome.
It's probably better to use one factory per client connection - easier
to distinguish between connections. Not strictly necessary, though.
___
Twisted-Python
Using a deque for this is a fantastic idea, though I would have used
rotate(-1), as your example looks like it rotate's "backwards" to me.
Matter of taste I suppose. It doesn't make much actual difference.
Kevin Horn
On Tue, Jan 11, 2011 at 7:11 AM, Jason Rennie wrote:
> You could probably ge
I agree that rotate(-1) is more intuitive. I barely gave it any
thought---almost forgot to include an argument for rotate as I initially
incorrectly assumed no argument would do something like rotate(-1) :-)
Jason
On Tue, Jan 11, 2011 at 1:36 PM, Kevin Horn wrote:
> Using a deque for this is a
On Mon, Jan 10, 2011 at 9:29 PM, Roberto Franchesco
wrote:
> I have been trying to get a squid proxy to "talk" to a twisted proxy
> and I came across an old email from this list where someone mentioned
> that they had implemented a basic ICP protocol in twisted.
> Does anyone still have that imple