[Pythonmac-SIG] windll on Mac?

Alex Hall mehgcap at gmail.com
Sat Oct 1 19:27:35 CEST 2011


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



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
>


-- 
Have a great day,
Alex (msg sent from GMail website)
mehgcap at gmail.com; http://www.facebook.com/mehgcap


More information about the Pythonmac-SIG mailing list