[Twisted-Python] data dispatch on massive connection counts

Antoine Pitrou solipsis at pitrou.net
Mon Nov 14 13:09:18 EST 2011

On Mon, 14 Nov 2011 09:57:46 -0800
Tobias Oberstein <tobias.oberstein at tavendo.de> wrote:
> Now I'm running out of options.
> I was told that the new Python 3 IO system does not use fopen(),
> however Twisted is not yet there on Python 3, right?

If you are wild, you can try https://bitbucket.org/pitrou/t3k/
(at least as an experiment :-))

> There is a backport of that new IO to Python 2.7, but I'm not sure
> if thats transparent for calls like Python open().

io.open() should work indeed. However, open() still uses the old I/O
routines (and therefore fopen()) for compatibility.
If you don't have control on the open() call, you could still try to
monkeypatch the module doing the open() call:

    somemodule.open = io.open



More information about the Twisted-Python mailing list