[Twisted-Python] Reactor interface for system configuration and events?

Bob Ippolito bob at redivi.com
Tue Oct 21 15:22:35 EDT 2003


On Tuesday, Oct 21, 2003, at 14:35 America/New_York, Axel Busch wrote:

>> I've just wrapped the SystemConfiguration interface from Darwin
>> (part of the configd project, which is open source under APSL).
> -snip-
>> Surely some or all of this is applicable to Win32 and Linux.  Anyone
>> knowledgeable about this sort of API on those platforms?  We should
>> develop an interface to deal with this stuff.
>
> coool. I'm very interested in the reactor interface you proposed.
> Maybe I can help with win32.
>
> But tell me, I thought twisted is pure python, so how are we
> going to integrate this for win32? The win32all extension does
> not provide the means to do it.
> I could write a .pyd module with c++ and boost. Would this help?

Yes, we'd need to write an extension or depend on ctypes to do this for 
win32 if win32all can't do it.  Twisted is not "pure python", but it 
will work without any C extension modules.

> Some things we would have to think of: For most of the stuff there
> is some difference between 95/98/ME, NT4/2000 and XP/2003. Some
> things will even not be available for 95/98/ME, like some Battery
> states etc.
> Most information should be available through Windows Messages
> like WM_USERCHANGED, WM_DEVICECHANGE etc., so polling is not
> required. Unfortunately 95/98/ME does not broadcast WM_DEVICECHANGE
> for all required device events.
> Well, just some thoughts, I didn't have time to try anything yet.

Well if it's not available, it won't work.. perhaps we'd have to divide 
it up into multiple interfaces, and have some sort of gestalt mechanism 
where you can ask if the reactor can provide the service on the 
particular platform it's currently running on.

-bob





More information about the Twisted-Python mailing list