* Installing python's pypiwin32 @ 2016-04-04 9:28 Dennis Putnam 2016-04-04 9:53 ` Marco Atzeri 0 siblings, 1 reply; 8+ messages in thread From: Dennis Putnam @ 2016-04-04 9:28 UTC (permalink / raw) To: cygwin [-- Attachment #1.1: Type: text/plain, Size: 274 bytes --] 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. [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 196 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Installing python's pypiwin32 2016-04-04 9:28 Installing python's pypiwin32 Dennis Putnam @ 2016-04-04 9:53 ` Marco Atzeri 2016-04-04 10:40 ` Dennis Putnam 0 siblings, 1 reply; 8+ messages in thread From: Marco Atzeri @ 2016-04-04 9:53 UTC (permalink / raw) To: cygwin 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Installing python's pypiwin32 2016-04-04 9:53 ` Marco Atzeri @ 2016-04-04 10:40 ` Dennis Putnam 2016-04-04 11:05 ` Ray Donnelly 2016-04-08 3:53 ` Brian Inglis 0 siblings, 2 replies; 8+ messages in thread From: Dennis Putnam @ 2016-04-04 10:40 UTC (permalink / raw) To: cygwin [-- Attachment #1.1: Type: text/plain, Size: 760 bytes --] 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? [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 196 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Installing python's pypiwin32 2016-04-04 10:40 ` Dennis Putnam @ 2016-04-04 11:05 ` Ray Donnelly 2016-04-04 12:32 ` Dennis Putnam 2016-04-08 3:53 ` Brian Inglis 1 sibling, 1 reply; 8+ messages in thread From: Ray Donnelly @ 2016-04-04 11:05 UTC (permalink / raw) To: cygwin, dap1 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Installing python's pypiwin32 2016-04-04 11:05 ` Ray Donnelly @ 2016-04-04 12:32 ` Dennis Putnam 2016-04-04 13:05 ` Dennis Putnam 0 siblings, 1 reply; 8+ messages in thread From: Dennis Putnam @ 2016-04-04 12:32 UTC (permalink / raw) To: cygwin [-- Attachment #1.1: Type: text/plain, Size: 1918 bytes --] 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=cdll.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=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? >> [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 196 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Installing python's pypiwin32 2016-04-04 12:32 ` Dennis Putnam @ 2016-04-04 13:05 ` Dennis Putnam 2016-04-04 14:04 ` Ray Donnelly 0 siblings, 1 reply; 8+ messages in thread From: Dennis Putnam @ 2016-04-04 13:05 UTC (permalink / raw) To: cygwin [-- Attachment #1.1: Type: text/plain, Size: 2480 bytes --] 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=cdll.LoadLibrary('/cygdrive/c/Windows/System32/User32.dll') mbw=getattr(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=cdll.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=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? >>> [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 196 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Installing python's pypiwin32 2016-04-04 13:05 ` Dennis Putnam @ 2016-04-04 14:04 ` Ray Donnelly 0 siblings, 0 replies; 8+ messages in thread From: Ray Donnelly @ 2016-04-04 14:04 UTC (permalink / raw) To: cygwin On Mon, Apr 4, 2016 at 2:05 PM, Dennis Putnam <dap1@bellsouth.net> wrote: > 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. Which version of Python are you using? > > Here is my trivial test program: > > #!/usr/bin/python > > from ctypes import * > > user32=cdll.LoadLibrary('/cygdrive/c/Windows/System32/User32.dll') > mbw=getattr(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=cdll.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=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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Installing python's pypiwin32 2016-04-04 10:40 ` Dennis Putnam 2016-04-04 11:05 ` Ray Donnelly @ 2016-04-08 3:53 ` Brian Inglis 1 sibling, 0 replies; 8+ messages in thread From: Brian Inglis @ 2016-04-08 3:53 UTC (permalink / raw) To: cygwin Dennis Putnam <dap1 <at> bellsouth.net> writes: > 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 > If that is the case then is there another way to open message boxes > without running Xwin? If you don't care how you do it, while looking for an alternative to XP cmd msg, found http://stackoverflow.com/a/8965189: $ mshta "javascript:alert('Message\n\nMultiple\nLines\ntoo\!');close();" Works on Win7 at least, as long as you don't strip .../Windows/system32 from PATH. More suggestions and variations at: http://stackoverflow.com/questions/12514475/how-can-you-create-pop-up-messages-in-a-batch-script -- 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-04-08 3:53 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-04-04 9:28 Installing python's pypiwin32 Dennis Putnam 2016-04-04 9:53 ` Marco Atzeri 2016-04-04 10:40 ` Dennis Putnam 2016-04-04 11:05 ` Ray Donnelly 2016-04-04 12:32 ` Dennis Putnam 2016-04-04 13:05 ` Dennis Putnam 2016-04-04 14:04 ` Ray Donnelly 2016-04-08 3:53 ` Brian Inglis
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).