delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:from:subject:to:references:message-id:date | |
:mime-version:in-reply-to:content-type; q=dns; s=default; b=b3My | |
6z234wo5E7xv2NxmpgtbUruUQJat7b9M3aZzrjNJLgYJDc3INv8Vb9dksfYKrLwC | |
VLeCtV2Y8kJSV7fc2czf+XJa6D7MENUwwyn5tfGjowxWJIUPqH/dMCK29/u1Tnge | |
xKh9pDdGf6DgC8sJ96g8u8VIuKMOzoeyk2Pj9AY= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:from:subject:to:references:message-id:date | |
:mime-version:in-reply-to:content-type; s=default; bh=Yeg76raSXF | |
V/mZU4ZeA72k6ARfE=; b=YO05gZ0Q4zAltrRkDzxTJunb+6S7Ybb65WniuAwHH0 | |
cQOb51PQ0BXcxFMzhN4wEWNDyUHHdf81ZtqcmjRCgw7POzxblM7k0tcxdN3hWRdS | |
yBtiukF0wGiJjoKFAC4XGz3RblYuWV4VPrW3/JHWlVnSKv5CaKHd4IbVyNnO1V+N | |
g= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=-0.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=dap1bellsouthnet, dap1 AT bellsouth DOT net, H*i:sk:57025EE, H*f:sk:57025EE |
X-HELO: | nm15-vm7.access.bullet.mail.gq1.yahoo.com |
X-Yahoo-SMTP: | vUK3UKuswBCE01YQVYEZ1wHCa.HPSVCYhektzgdifA-- |
From: | Dennis Putnam <dap1 AT bellsouth DOT net> |
Subject: | Re: Installing python's pypiwin32 |
To: | cygwin AT cygwin DOT com |
References: | <570233D4 DOT 5090103 AT bellsouth DOT net> <57023987 DOT 2060604 AT gmail DOT com> <570244A1 DOT 20302 AT bellsouth DOT net> <CAOYw7dsVeLK8-8kemWgfhxRL2gSgZiskiVTiamRHDBpOt0JN6Q AT mail DOT gmail DOT com> <57025EEB DOT 9080302 AT bellsouth DOT net> |
Message-ID: | <570266A6.7020505@bellsouth.net> |
Date: | Mon, 4 Apr 2016 09:05:42 -0400 |
User-Agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
MIME-Version: | 1.0 |
In-Reply-To: | <57025EEB.9080302@bellsouth.net> |
X-IsSubscribed: | yes |
--SFg3WIGmdRGrq9rPBRu4AH1ib9ajacLsG Content-Type: multipart/mixed; boundary="07VKG3NIeOM3inUPaVg73N8MIf5dScnaT" From: Dennis Putnam <dap1 AT bellsouth DOT net> To: cygwin AT cygwin DOT com Message-ID: <570266A6 DOT 7020505 AT bellsouth DOT net> Subject: Re: Installing python's pypiwin32 References: <570233D4 DOT 5090103 AT bellsouth DOT net> <57023987 DOT 2060604 AT gmail DOT com> <570244A1 DOT 20302 AT bellsouth DOT net> <CAOYw7dsVeLK8-8kemWgfhxRL2gSgZiskiVTiamRHDBpOt0JN6Q AT mail DOT gmail DOT com> <57025EEB DOT 9080302 AT bellsouth DOT net> In-Reply-To: <57025EEB DOT 9080302 AT bellsouth DOT net> --07VKG3NIeOM3inUPaVg73N8MIf5dScnaT Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ray, I kind of found the problem. The import should be: from ctypes import * Now I am getting a message box but the characters in it are garbage. I was tried to send an image but apparently this list does not allow that. Here is my trivial test program: #!/usr/bin/python from ctypes import * user32=3Dcdll.LoadLibrary('/cygdrive/c/Windows/System32/User32.dll') mbw=3Dgetattr(user32,"MessageBoxW") mbw(0,'Hello world!!','Hello',2) On 4/4/2016 8:32 AM, Dennis Putnam wrote: > Hi Ray, > > Thanks. That is actually where I started but I was not aware I needed > those first 2 assignments. I did not find any examples of MessageBoxW > that included that detail. However, now I get a different error. I am > guessing there is another import I'm missing: > > Traceback (most recent call last): > File "./test.py", line 5, in <module> > user32=3Dcdll.LoadLibrary('/cygdrive/c/Windows/System32/User32.dll') > NameError: name 'cdll' is not defined > > On 4/4/2016 7:05 AM, Ray Donnelly wrote: >> Yes, you can use the ctypes module [1] for this sort of thing: >> >> import ctypes >> user32=3Dcdll.LoadLibrary('/cygdrive/c/Windows/System32/User32.dll') >> mbw=3Dgetattr(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 AT bellsouth DOT net> wrot= e: >>> 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 modu= le >>>>> 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? >>> --07VKG3NIeOM3inUPaVg73N8MIf5dScnaT-- --SFg3WIGmdRGrq9rPBRu4AH1ib9ajacLsG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (MingW32) iEYEARECAAYFAlcCZqYACgkQ/fiWYqZ2tVTzMACfVPmileyz4EPxjcLBYzlAZbhF MREAoIU1ZpD/0IAh3QfYmjrpJkk35qPE =ZXBM -----END PGP SIGNATURE----- --SFg3WIGmdRGrq9rPBRu4AH1ib9ajacLsG--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |