[Pythonmac-SIG] windll on Mac?

Chris Barker Chris.Barker at noaa.gov
Sun Oct 2 20:15:31 CEST 2011


On 10/1/11 10:27 AM, Alex Hall wrote:
> You said to find which windll functions are used. As far as I can
> tell, here are all of them:
> def ActivateWindow(hWindow):
> 	KERNEL32 = ctypes.windll.KERNEL32
> 	GetCurrentThreadId = KERNEL32.GetCurrentThreadId
> 	USER32 = ctypes.windll.USER32
> 	AttachThreadInput = USER32.AttachThreadInput
> 	BringWindowToTop = USER32.BringWindowToTop
> 	GetForegroundWindow = USER32.GetForegroundWindow
> 	GetWindowThreadProcessId = USER32.GetWindowThreadProcessId
> 	ShowWindow=USER32.ShowWindow
>    #rest of function, using the above methods

You may get help on this from the wx list, but on this list, you'll 
probably need to figure out what these functions actually do, and how 
the results are used, to know how you would accomplish the same thing on 
a Mac.

-Chris


>
>
> On 10/1/11, Chris Barker<Chris.Barker at noaa.gov>  wrote:
>> On 10/1/11 7:28 AM, Alex Hall wrote:
>>> I just joined this list, so I am sorry if this is not the right place to
>>> ask.
>>> I have written an application in python, and one library I use relies
>>> on the ctypes.windll functions, specifically user32 and kernel32. I
>>> would like to use this library, but I also want to make my application
>>> cross-platform. Is there an equivalent to windll on the Mac?
>>
>> In a word, no.
>>
>>> It looks
>>> like the library uses the dll for finding things like the current
>>> thread id, current window, and for functions like window/thread
>>> management (it is a dialog builder library built around wx).
>>
>> These sorts of things will have to be done differently on the Mac. There
>> is some chance that some of them may be done with the wx lib (which
>> would wrap the Mac version), but most likely some will require
>> Mac-specific methods.
>>
>> If you find out exactly what calls are made, and what they do, I'd ask
>> on the wxPython list, and then here, to find out how to do it on the Mac.
>>
>> -Chris
>>
>>
>>
>>    The
>>> library can be found here:
>>> http://www.empowermentzone.com/pylbc.zip
>>> Thanks in advance for any information you can provide.
>>>
>>
>>
>> --
>> Christopher Barker, Ph.D.
>> Oceanographer
>>
>> Emergency Response Division
>> NOAA/NOS/OR&R            (206) 526-6959   voice
>> 7600 Sand Point Way NE   (206) 526-6329   fax
>> Seattle, WA  98115       (206) 526-6317   main reception
>>
>> Chris.Barker at noaa.gov
>> _______________________________________________
>> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
>> http://mail.python.org/mailman/listinfo/pythonmac-sig
>> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
>>
>
>


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov


More information about the Pythonmac-SIG mailing list