[Twisted-Python] win32eventreactor
Jp Calderone
exarkun at intarweb.us
Wed Feb 12 13:43:52 MST 2003
On Wed, Feb 12, 2003 at 09:35:34PM +0100, Thomas Heller wrote:
> How can I access the reactor if I want to use the win32eventreactor?
> It seems I have to win32eventreactor.install() before importing
> the reactor from twisted.internet, otherwise I get a traceback
> saying AssertionError: reactor already installed.
>
> Is this the recommended way to do it:
>
> -----
> from twisted.internet import win32eventreactor
> win32eventreactor.install()
> from twisted.internet import reactor
>
> ... other stuff
>
> Thanks, Thomas
>
Create a tap file, and when running it with twistd, specify
"--reactor win32" on the command line. In the rest of your program, do
nothing special. Anywhere you access twisted.internet.reactor, you'll get
the win32 reactor.
Jp
--
Seduced, shaggy Samson snored.
She scissored short. Sorely shorn,
Soon shackled slave, Samson sighed,
Silently scheming,
Sightlessly seeking
Some savage, spectacular suicide.
-- Stanislaw Lem, "Cyberiad"
--
up 4 days, 0:28, 2 users, load average: 0.09, 0.03, 0.01
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: </pipermail/twisted-python/attachments/20030212/9a2e5d4e/attachment.sig>
More information about the Twisted-Python
mailing list