[Twisted-Python] _dumbwin32proc and PIPE_NOWAIT

Manlio Perillo manlio_perillo at libero.it
Sun Oct 1 06:08:12 EDT 2006

glyph at divmod.com ha scritto:
> [...]
>> Is win32eventreactor not working and not tested?
> It's tested, but it's not working.  See
> http://twistedmatrix.com/buildbot/ - you'll notice the "win32-win32er"
> column is always red.  It's also limited because it still allows only 63
> objects.

I have just runned the test suite (with Twisted 2.4).

I got
FAILED (skips=76, expectedFailures=7, failures=6, errors=13, successes=868)

Moreover about 2-3 time I got a peak to CPU and memory usage (up to 300 MB).

>> You did not mention it in the "removing unsupported reactors in twisted"
>> thread.
> It has maintainers, it has a buildbot, and it's been gradually
> decreasing its number of failing tests over time.  It didn't seem like a
> candidate for removal.
>> I have write it, now stdio works ;-).
>> Unfortunately it is not very efficient since:
>> - it uses _pollingfile (not a real porblem)
>> - it reads raw keyboard input and have to do all low level stuff like
>>  '\b' handling, '\r' conversion, and so
> It's very hard to do these things efficiently, so I'm not too worried
> about that.  We also don't have a lot of programmers interested in
> Windows support.  My interest in Windows support ends right about at the
> point where the servers I develop can be successfully tested and
> developed on win32 :).  Providing functionality in an inefficient
> implementation at least provides some useful functionality in the
> meanwhile, and something to optimize later if it becomes important.

The implementation surely can be optimized.

>> Here is the main code.


One more thing.
As I have said I would like to provide a portable interface to terminal
handling, so that scripts like conch can works on both POSIX and Window.

There are several options:
1) Write modules like twised.python.fncl, twisted.python.termios and
   twisted.python.pty, that implements the same POSIX interface on
   Windows too.

   I suspect that this can be done but it is hard (and I'm lazy).
   Moreover there is the problem with SIGWINCH handling
   (Windows can - not yet tested - report events about console window

2) Write an high level module like twisted.python.tty
   that provides functions like
   enableRawMode(fd, trueOrFalse), enableEcho(fd, trueOrFalse),
   addWindowChangeCallback(cb), and so

3) Write an high level module like twisted.internet.conio
   that provides StdIOChannel (just to pick a name) objects.
   These objects will have the interface as in 2).

Regards  Manlio Perillo

More information about the Twisted-Python mailing list