[Twisted-Python] Event queue in the Python std lib
dvkeeney at gmail.com
Fri Jul 1 21:54:26 EDT 2005
I am not yet a twisted programmer, so my contribution to this thread
has more to do with English interpretation than with twisted.
A principle problem with event mainloops is that each toolkit wants to
provide one, and the program can only have one running at a time
(barring multithreading fanciness). When I read the original post
referring to the discussion with GvR, I thought, cool, a resolution to
the different-mainloops-for-different-tool kits problem: a mainloop
that can integrate various tool kits.
It seems that all other respondents have interpreted it as a call to
include twisted, or parts of it _as is_, in the stdlib. I did not see
in the original post a call for twisted _networking_ inclusion at all.
When I read about twisted on other lists (the pygame list comes to
mind), the examples almost always use the poll() reactor method,
because it allows you to use twisted from your own mainloop; you can
then integrate other tool kits into that home-spun mainloop by
whatever provisions they allow for doing so.
We shouldn't have to be that creative. There should be one std dist
mainloop that can accommodate, via callbacks perhaps, whatever
(multiple) services need a mainloop. So a tkinter-twisted mainloop
and a gtk-twisted mainloop would not be needed as separate components.
I am too naive to write such a library, nor even to write a PEP, so I
won't be running with this, but is there something impossible about my
More information about the Twisted-Python