Re: [Twisted-Python] Help with trial test failure

2013-08-05 Thread Glyph
On Aug 5, 2013, at 2:09 AM, Benjamin BERTRAND wrote: > That's why the inlineCallbacks solves the problem. When I yield on the > self.server.dataReceived, I wait for the deferred in the publish methods to > fire and everything is clean when I close the connection. > > Is there another way to d

Re: [Twisted-Python] Multiplexing streams with Conch

2013-08-05 Thread exarkun
On 5 Aug, 09:20 pm, _...@lvh.io wrote: Hi, Sorry, when editing and cutting my post I got rid of something important :-) When you log in, you get greeted by some terminal app, say something written with Urwid or so. In addition to that, on the client, you can start accepting connections on so

[Twisted-Python] asserting an exception wrapped in a defer.FirstError

2013-08-05 Thread Jorge Gonzalez
In a trial test case like this: --- *def testFailureFromDeferredList(self):* *d = defer.fail(ValueError('bad value'))* *return self.assertFailure(defer.gatherResults([d]), Va

Re: [Twisted-Python] Multiplexing streams with Conch

2013-08-05 Thread Laurens Van Houtven
Hi, Sorry, when editing and cutting my post I got rid of something important :-) When you log in, you get greeted by some terminal app, say something written with Urwid or so. In addition to that, on the client, you can start accepting connections on some TCP port, and at some point the server wi

Re: [Twisted-Python] Multiplexing streams with Conch

2013-08-05 Thread Itamar Turner-Trauring
On 08/05/2013 01:49 PM, Laurens Van Houtven wrote: Hi, I'd like to do something akin to port forwarding using Conch. Specifically, I want to be able to make connections to something listening on a particular port on the client, and I want the client to be able to make connections to some Clie

[Twisted-Python] Multiplexing streams with Conch

2013-08-05 Thread Laurens Van Houtven
Hi, I'd like to do something akin to port forwarding using Conch. Specifically, I want to be able to make connections to something listening on a particular port on the client, and I want the client to be able to make connections to some ClientFactory in the server. Can I do this with regular SS

Re: [Twisted-Python] transport.write performance.

2013-08-05 Thread zipxing
cpython+ujson   6s cpython+cjson   9s pypy+json       30s > From: zipx...@hotmail.com > To: twisted-python@twistedmatrix.com > Date: Mon, 5 Aug 2013 19:26:40 +0800 > Subject: Re: [Twisted-Python] transport.write performance. > > tjson.py > -

Re: [Twisted-Python] transport.write performance.

2013-08-05 Thread zipxing
tjson.py -- import json                       #for pypy #import ujson as json             #for python tdic = {"aaa":1, "bbb":2, "ccc":3, "ddd":['1','2','3','4','abcdefghijk'], "eee":{"":1, "":2, "":[1,2,3,4,5,'aa

Re: [Twisted-Python] Help with trial test failure

2013-08-05 Thread Benjamin Bertrand
On Sun, Aug 4, 2013 at 7:55 PM, Itamar Turner-Trauring wrote: > On 08/04/2013 10:25 AM, Benjamin BERTRAND wrote: > >> Hi, >> >> I'm trying to write a simple gateway to receive messages using a specific >> protocol and publish/store them using txredis. >> I wrote a small example that seems to work.