This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Installing python's pypiwin32
- From: Ray Donnelly <mingw dot android at gmail dot com>
- To: cygwin at cygwin dot com, dap1 at bellsouth dot net
- Date: Mon, 4 Apr 2016 12:05:07 +0100
- Subject: Re: Installing python's pypiwin32
- Authentication-results: sourceware.org; auth=none
- References: <570233D4 dot 5090103 at bellsouth dot net> <57023987 dot 2060604 at gmail dot com> <570244A1 dot 20302 at bellsouth dot net>
Yes, you can use the ctypes module [1] for this sort of thing:
import ctypes
user32=cdll.LoadLibrary('/cygdrive/c/Windows/System32/User32.dll')
mbw=getattr(user32,"MessageBoxW")
mbw(0,"Hello World","Caption",2)
.. but I think the ctypes module on Cygwin's Pythons should support
the windll stuff out of the box and it doesn't seem to, then you could
just do ctypes.windll.user32.MessageBoxW(...) instead.
[1] https://docs.python.org/2/library/ctypes.html
--
Best regards,
Ray.
On Mon, Apr 4, 2016 at 11:40 AM, Dennis Putnam <dap1@bellsouth.net> wrote:
> On 4/4/2016 5:53 AM, Marco Atzeri wrote:
>> On 04/04/2016 11:28, Dennis Putnam wrote:
>>> I'm trying to install pypiwin32 and have hit a stone wall. That module
>>> wants _winreg so I installed cygwinreg. However, I cannot find a way to
>>> tell pip to use cygwinreg rather than _winreg. Is there a way to alias
>>> or some way to get pip to use the right module? TIA.
>>>
>>
>> I doubt the package is cygwin compatible
>>
>> --
>> Problem reports: http://cygwin.com/problems.html
>> FAQ: http://cygwin.com/faq/
>> Documentation: http://cygwin.com/docs.html
>> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
>>
>>
> If that is the case then is there another way to open message boxes
> without running Xwin?
>
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple