From Chris.Clark at actian.com Thu Dec 4 01:08:10 2014 From: Chris.Clark at actian.com (Chris Clark) Date: Thu, 4 Dec 2014 00:08:10 +0000 Subject: [python-win32] win32api - small patch for win32verstamp.py Message-ID: <2d45095430224832a2bccfc543650927@DM2PR06MB493.namprd06.prod.outlook.com> I found an hgweb repo for win32api at http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32 but I could not work out how to clone it (I even tried the usual Mercurial path for sf projects, http://hg.code.sf.net/p/pywin32/mercurial ) so please excuse the inline diff. rupole, your name was on the last commit hence emailing you! I've updated win32/Lib/win32verstamp.py to allow empty values for original filename. The previous test was a negative test, if original value is not specified this is set to None, if a user explicitly sets an empty string this will now be used instead of being overwritten and ignored. C:\ >diff -u C:\Python27\Lib\site-packages\win32\lib\win32verstamp.py win32verstamp.py --- C:\Python27\Lib\site-packages\win32\lib\win32verstamp.py Sat Mar 19 02:51 :22 2011 +++ win32verstamp.py Wed Dec 03 16:03:16 2014 @@ -1,3 +1,5 @@ +# based on Python27\Lib\site-packages\win32\lib\win32verstamp.py +# original filename now supports empty strings """ Stamp a Win32 binary with version information. """ @@ -126,7 +128,7 @@ if not ifn: ifn = os.path.basename(pathname) ofn = options.original_filename - if not ofn: + if ofn is None: ofn = os.path.basename(pathname) sdata = { I have previously signed a PSF contributor agreement https://www.python.org/psf/contrib/ a while back if that helps any. Regards, Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From rupole at spideroak.com Sat Dec 6 21:04:04 2014 From: rupole at spideroak.com (Roger Upole) Date: Sat, 6 Dec 2014 15:04:04 -0500 Subject: [python-win32] win32api - small patch for win32verstamp.py In-Reply-To: <2d45095430224832a2bccfc543650927@DM2PR06MB493.namprd06.prod.outlook.com> References: <2d45095430224832a2bccfc543650927@DM2PR06MB493.namprd06.prod.outlook.com> Message-ID: Thanks for the patch, applied in http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32/rev/fcfbe0ff52ca Roger From: Chris Clark Sent: Wednesday, December 03, 2014 7:08 PM To: rupole at spideroak.com Cc: python-win32 at python.org Subject: win32api - small patch for win32verstamp.py I found an hgweb repo for win32api at http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32 but I could not work out how to clone it (I even tried the usual Mercurial path for sf projects, http://hg.code.sf.net/p/pywin32/mercurial ) so please excuse the inline diff. rupole, your name was on the last commit hence emailing you! I?ve updated win32/Lib/win32verstamp.py to allow empty values for original filename. The previous test was a negative test, if original value is not specified this is set to None, if a user explicitly sets an empty string this will now be used instead of being overwritten and ignored. C:\ >diff -u C:\Python27\Lib\site-packages\win32\lib\win32verstamp.py win32verstamp.py --- C:\Python27\Lib\site-packages\win32\lib\win32verstamp.py Sat Mar 19 02:51 :22 2011 +++ win32verstamp.py Wed Dec 03 16:03:16 2014 @@ -1,3 +1,5 @@ +# based on Python27\Lib\site-packages\win32\lib\win32verstamp.py +# original filename now supports empty strings """ Stamp a Win32 binary with version information. """ @@ -126,7 +128,7 @@ if not ifn: ifn = os.path.basename(pathname) ofn = options.original_filename - if not ofn: + if ofn is None: ofn = os.path.basename(pathname) sdata = { I have previously signed a PSF contributor agreement https://www.python.org/psf/contrib/ a while back if that helps any. Regards, Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From blairdhall at gmail.com Mon Dec 8 04:34:55 2014 From: blairdhall at gmail.com (Blair Hall) Date: Mon, 8 Dec 2014 16:34:55 +1300 Subject: [python-win32] py2exe com_server newbie problem In-Reply-To: References: Message-ID: Update -------- I now have something working, but not everywhere :-( I have two different machines, both Win7 64-bit (one professional the other home), both with identical versions of Python 2.7.8 and py2exe 0.6.9. I can create a COM server DLL on the machine running Win7-Home (machine A) but when I try the same process on the one running Win7-professional (machine B) it does not work in the same way. After using py2exe on machine B I cannot get regsvr32 to register the server on either machine. But when I use py2exe on machine A the server can be registered (on both machines). I have used Dependency Walker to look at what is happening and I see that during registration an attempt to load zlib.pyd is made. This file is not available, so I think that is causing an error message. However, zlib is not actually needed, so the registration of the DLL then proceeds (after clearing the error dialog) and is successful. The same thing happens when de-registering the DLL. I have no idea why zlib is required when building on one machine and not the other. Can anyone suggest a reason? On Fri, Sep 26, 2014 at 5:32 PM, Blair Hall wrote: > I have been working on this all day, with no joy. Some help would be > appreciated :-) > > I have a simple COM server (that I found on the internet): > > #------------------------------------------------------------------- > import pythoncom > > import sys > > class HelloWorld: > > #pythoncom.frozen = 1 > if hasattr(sys, 'importers'): > _reg_class_spec_ = "__main__.HelloWorld" > _reg_clsctx_ = pythoncom.CLSCTX_LOCAL_SERVER > _reg_clsid_ = '{E3D5F332-F080-47B3-A319-A3A0E287E466}' > _reg_desc_ = "Python Test COM Server" > _reg_progid_ = "Python.TestServer" > _public_methods_ = ['Hello'] > _public_attrs_ = ['softspace', 'noCalls'] > _readonly_attrs_ = ['noCalls'] > > def __init__(self): > self.softspace = 1 > self.noCalls = 0 > > def Hello(self, who): > self.noCalls = self.noCalls + 1 > # insert "softspace" number of spaces > print "Hello" + " " * self.softspace + str(who) > return "Hello" + " " * self.softspace + str(who) > > > if __name__=='__main__': > import sys > if hasattr(sys, 'importers'): > > # running as packed executable. > > if '--register' in sys.argv[1:] or '--unregister' in sys.argv[1:]: > > # --register and --unregister work as usual > import win32com.server.register > win32com.server.register.UseCommandLine(HelloWorld) > else: > > # start the server. > from win32com.server import localserver > localserver.main() > else: > > import win32com.server.register > win32com.server.register.UseCommandLine(HelloWorld) > #------------------------------------------------------------------- > > > This works just fine as a python module. I can run it, register the COM > server and use the Hello method in VBA code inside Excel. > > However, I would like to make a DLL, register it, and be able to have the > same access to the COM server. I have not been able to do that so far. > > I have the following simple setup.py module > > #------------------------------------------------------------------------ > from distutils.core import setup > import py2exe > > setup(com_server = ["test"]) > #------------------------------------------------------------------------ > > Using this with py2exe generates both test.dll and test.exe. > > I can call test.exe with '--register' on the command line and the COM > server is registered. > > However, when I use regsvr32 to register test.dll, the COM server does not > work with Excel. (although regsvr32 says that the DLL has been successfully > registered). > > What am I missing? > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From snake007uk at gmail.com Tue Dec 9 20:41:19 2014 From: snake007uk at gmail.com (Kashif Ali) Date: Tue, 9 Dec 2014 19:41:19 +0000 Subject: [python-win32] Pywin32 copying and pasting via mouse/keyboard Message-ID: Hi, I was helping someone can help me out. I am using the pywin32 module, however I can't work out how to get the mouse to highlight specific text on a webpage and save it into a variable. I'm making an auto clicker, everything seems to be fine I can click on browser url bar, enter a url etc... But if I wanted to select text I don't know how to, then I would like for it save that into a variable, which I can use to work out next steps. for example, copy a number from the webpage put it into the clipboard then transfer it into a variable to do some arithmetic on etc.. any help would be appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: From timr at probo.com Tue Dec 9 22:23:36 2014 From: timr at probo.com (Tim Roberts) Date: Tue, 9 Dec 2014 13:23:36 -0800 Subject: [python-win32] Pywin32 copying and pasting via mouse/keyboard In-Reply-To: References: Message-ID: <54876858.7040703@probo.com> Kashif Ali wrote: > > I was helping someone can help me out. I am using the pywin32 module, > however I can't work out how to get the mouse to highlight specific > text on a webpage and save it into a variable. > > I'm making an auto clicker, everything seems to be fine I can click on > browser url bar, enter a url etc... But if I wanted to select text I > don't know how to, then I would like for it save that into a variable, > which I can use to work out next steps. > > for example, copy a number from the webpage put it into the clipboard > then transfer it into a variable to do some arithmetic on etc.. Your description is a little confusing, in part because it's not clear what you mean by "auto clicker". Are you saying that you want to be able to select text manually with your mouse, then do something that uses the selected text? Traditionally, that has been done by a browser plug-in, which means different modules for each different browser. You can't do it with the normal UI automatic tools, because the browsers don't use normal window controls. They implement their own controls, then draw everything into a bitmap, then blit the bitmap to the screen. Basically, the browsers have become an operating system unto themselves. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From timr at probo.com Wed Dec 10 01:02:07 2014 From: timr at probo.com (Tim Roberts) Date: Tue, 9 Dec 2014 16:02:07 -0800 Subject: [python-win32] Pywin32 copying and pasting via mouse/keyboard In-Reply-To: References: <54876858.7040703@probo.com> Message-ID: <54878D7F.2050901@probo.com> Kashif Ali wrote: > so when i say auto clicker, I mean using pywin32 and its mouse moving > functions and clicking functions: > > |def click(x,y): > win32api.SetCursorPos((x,y)) > win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,x,y,0,0) > win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,x,y,0,0) > click(10,10)| |That's really delicate. If a field moves in the next browser version, you're broken. | > |However I want to be able to copy text in this automated fashion as > well. I know there is a clipboard function, however I don't know how > to copy text to it from the webpage, as i would need to select the > text and the send it to the clipboard, at which point i can then try > to get it into a variable.| Yep, that's the problem. If it were a normal text box, you could send EM_SETSEL to set the selection, them WM_COPY to copy to the clipboard. But, as I said, the browser window is not a normal text box. It's essentially a big bitmap. Now, continuing to apply the same logic you have above, you could send LEFTDOWN at the start of the text, then MOVE, then LEFTUP and the end of the text, then send a Ctrl-C event, but that means you have to know exactly where the text is. It might be easier to use COM to pull the HTML text of the page, and parse that text for the information. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From timr at probo.com Wed Dec 10 01:26:59 2014 From: timr at probo.com (Tim Roberts) Date: Tue, 9 Dec 2014 16:26:59 -0800 Subject: [python-win32] Pywin32 copying and pasting via mouse/keyboard In-Reply-To: References: <54876858.7040703@probo.com> <54878D7F.2050901@probo.com> Message-ID: <54879353.5060404@probo.com> Kashif Ali wrote: > I could try to use that logic, left click move right then crtl+c it > might work. > > I am interested in the COM to pull the HTML - however what happens if > its generated html (java script etc..) Yep. There is no perfect solution. Some web pages intentionally make it difficult to do what you are attempting. I always generate email addresses with Javascript, just so that scummy spammer scrapers can't easily grab the text. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From blairdhall at gmail.com Wed Dec 10 02:57:12 2014 From: blairdhall at gmail.com (Blair Hall) Date: Wed, 10 Dec 2014 14:57:12 +1300 Subject: [python-win32] python-win32 Digest, Vol 141, Issue 3 In-Reply-To: References: Message-ID: Update 2 ----------- I found a version of py2exe 0.6.10 ( http://www.lfd.uci.edu/~gohlke/pythonlibs/#py2exe), which does not generate a DLL that trys to load zlib.pyd. However, that was not my problem. By using Dependency Walker I can see that, during the registration of the DLL complied on the win professional machine, the DLL loads a version of MSVCR90.dll that it finds in the Windows path (which is not the one bundled in a manifest by py2exe). However, the DLL complied in the Windows home machine does not try to do this (when trying to register the DLL on the same machine). Now, I am perplexed. The source files used to create the DLL are exactly the same in each case. The machines have the same versions of Python (2.7.8) and roughly the same suite of modules and libraries. So I don't understand how this can happen. Something about the machine configuration seems to be captured by py2exe when the DLL is complied. Can anyone offer an insight? I would like to develop a DLL that I can distribute widely. But as it stands, I am afraid that the process of registering the DLL will be very sensitive to the software installed on the client's machine. How can I make the DLL less vulnerable to this sort of problem? Message: 1 > Date: Mon, 8 Dec 2014 16:34:55 +1300 > From: Blair Hall > To: python-win32 > Subject: Re: [python-win32] py2exe com_server newbie problem > Message-ID: > < > CAJeTVApB_oZmOnML+-mch8NJ2CKjjstP5RJxbDSVYJ7VDX83Ug at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Update > -------- > > I now have something working, but not everywhere :-( > > I have two different machines, both Win7 64-bit (one professional the other > home), both with identical versions of Python 2.7.8 and py2exe 0.6.9. > > I can create a COM server DLL on the machine running Win7-Home (machine A) > but when I try the same process on the one running Win7-professional > (machine B) it does not work in the same way. > > After using py2exe on machine B I cannot get regsvr32 to register the > server on either machine. But when I use py2exe on machine A the server can > be registered (on both machines). > > I have used Dependency Walker to look at what is happening and I see that > during registration an attempt to load zlib.pyd is made. This file is not > available, so I think that is causing an error message. However, zlib is > not actually needed, so the registration of the DLL then proceeds (after > clearing the error dialog) and is successful. The same thing happens when > de-registering the DLL. > > I have no idea why zlib is required when building on one machine and not > the other. Can anyone suggest a reason? > > > > > On Fri, Sep 26, 2014 at 5:32 PM, Blair Hall wrote: > > > I have been working on this all day, with no joy. Some help would be > > appreciated :-) > > > > I have a simple COM server (that I found on the internet): > > > > #------------------------------------------------------------------- > > import pythoncom > > > > import sys > > > > class HelloWorld: > > > > #pythoncom.frozen = 1 > > if hasattr(sys, 'importers'): > > _reg_class_spec_ = "__main__.HelloWorld" > > _reg_clsctx_ = pythoncom.CLSCTX_LOCAL_SERVER > > _reg_clsid_ = '{E3D5F332-F080-47B3-A319-A3A0E287E466}' > > _reg_desc_ = "Python Test COM Server" > > _reg_progid_ = "Python.TestServer" > > _public_methods_ = ['Hello'] > > _public_attrs_ = ['softspace', 'noCalls'] > > _readonly_attrs_ = ['noCalls'] > > > > def __init__(self): > > self.softspace = 1 > > self.noCalls = 0 > > > > def Hello(self, who): > > self.noCalls = self.noCalls + 1 > > # insert "softspace" number of spaces > > print "Hello" + " " * self.softspace + str(who) > > return "Hello" + " " * self.softspace + str(who) > > > > > > if __name__=='__main__': > > import sys > > if hasattr(sys, 'importers'): > > > > # running as packed executable. > > > > if '--register' in sys.argv[1:] or '--unregister' in > sys.argv[1:]: > > > > # --register and --unregister work as usual > > import win32com.server.register > > win32com.server.register.UseCommandLine(HelloWorld) > > else: > > > > # start the server. > > from win32com.server import localserver > > localserver.main() > > else: > > > > import win32com.server.register > > win32com.server.register.UseCommandLine(HelloWorld) > > #------------------------------------------------------------------- > > > > > > This works just fine as a python module. I can run it, register the COM > > server and use the Hello method in VBA code inside Excel. > > > > However, I would like to make a DLL, register it, and be able to have the > > same access to the COM server. I have not been able to do that so far. > > > > I have the following simple setup.py module > > > > #------------------------------------------------------------------------ > > from distutils.core import setup > > import py2exe > > > > setup(com_server = ["test"]) > > #------------------------------------------------------------------------ > > > > Using this with py2exe generates both test.dll and test.exe. > > > > I can call test.exe with '--register' on the command line and the COM > > server is registered. > > > > However, when I use regsvr32 to register test.dll, the COM server does > not > > work with Excel. (although regsvr32 says that the DLL has been > successfully > > registered). > > > > What am I missing? > > > > > > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.python.org/pipermail/python-win32/attachments/20141208/e9e97160/attachment-0001.html > > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > https://mail.python.org/mailman/listinfo/python-win32 > > > ------------------------------ > > End of python-win32 Digest, Vol 141, Issue 3 > ******************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From timr at probo.com Wed Dec 10 18:19:33 2014 From: timr at probo.com (Tim Roberts) Date: Wed, 10 Dec 2014 09:19:33 -0800 Subject: [python-win32] py2exe com_server newbie problem In-Reply-To: References: Message-ID: <548880A5.9090108@probo.com> Blair Hall wrote: > > By using Dependency Walker I can see that, during the registration of > the DLL complied on the win professional machine, the DLL loads a > version of MSVCR90.dll that it finds in the Windows path (which is not > the one bundled in a manifest by py2exe). However, the DLL complied in > the Windows home machine does not try to do this (when trying to > register the DLL on the same machine). > > Now, I am perplexed. The source files used to create the DLL are > exactly the same in each case. The machines have the same versions of > Python (2.7.8) and roughly the same suite of modules and libraries. So > I don't understand how this can happen. Something about the machine > configuration seems to be captured by py2exe when the DLL is complied. Visual Studio 2008 still used the stupid "side-by-side" DLL installation technique. What that means is that compiler doesn't just embed a link to MSVCR90.dll -- it embeds a link to a specific version of MSVCR90.dll. (As of today, there are SIX such versions.) Side-by-side DLLs are intended to be installed centrally, in the \Windows\WinSxS directory tree. If the version you need is in the central repository, it will use that one. Otherwise, it looks elsewhere, including in a subdirectory of the application, assuming the manifest allows that. So, the likely story here is that one of your machines has the latest Visual Studio 2008 Redistributable Runtime installed, and the other does not. Starting in Visual Studio 2010, they wisely dropped the side-by-side technique for the MSVC runtime. > I would like to develop a DLL that I can distribute widely. But as it > stands, I am afraid that the process of registering the DLL will be > very sensitive to the software installed on the client's machine. True. This has always been true. It's equally true on Linux, but people put up with it. ("You must have glib 4.3.1 and foolib 1.19.2 and barlib 2.2.1, make sure you install them first.") > How can I make the DLL less vulnerable to this sort of problem? What "problem" are you seeing? You can certainly put up a link to the Microsoft download site for the Visual Studio 2008 Runtime that you require. Or, you can ship the redistributable installer with your app. That was the intended solution when VS2008 came out. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From blairdhall at gmail.com Thu Dec 11 23:58:27 2014 From: blairdhall at gmail.com (Blair Hall) Date: Fri, 12 Dec 2014 11:58:27 +1300 Subject: [python-win32] python-win32 Digest, Vol 141, Issue 5 In-Reply-To: References: Message-ID: Thanks for your answer Visual Studio 2008 still used the stupid "side-by-side" DLL installation > technique. What that means is that compiler doesn't just embed a link > to MSVCR90.dll -- it embeds a link to a specific version of > MSVCR90.dll. (As of today, there are SIX such versions.) Side-by-side > DLLs are intended to be installed centrally, in the \Windows\WinSxS > directory tree. If the version you need is in the central repository, > it will use that one. Otherwise, it looks elsewhere, including in a > subdirectory of the application, assuming the manifest allows that. > > So, the likely story here is that one of your machines has the latest > Visual Studio 2008 Redistributable Runtime installed, and the other does > not. > I don't think this is the issue. Here is a excerpt from the Dependency Walker log: LoadLibraryExW("server.dll", 0x00000000, LOAD_WITH_ALTERED_SEARCH_PATH) called from "c:\windows\syswow64\REGSVR32.EXE" at address 0x00B720FF by thread 1. Loaded "c:\proj_py\gtxl\vba\dist_a\SERVER.DLL" at address 0x10000000 by thread 1. Successfully hooked module. Loaded "c:\windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\MSVCR90.DLL" at address 0x74580000 by thread 1. Successfully hooked module. I see this in the logs obtained when registering both versions of my DLL (one complied on each machine). However, in the log of the version that fails I see this a little later on LoadLibraryA("msvcr90.dll") called from "c:\proj_py\gtxl\vba\dist_b\_CTYPES.PYD" at address 0x1D1A9742 by thread 1. Loaded "c:\program files (x86)\intel\icls client\MSVCR90.DLL" at address 0x59090000 by thread 1. Successfully hooked module. So, for some reason this other version is also being loaded. That leads to subsequent errors. When I hide the intel files I see this instead of the above (and, although the second line shows an error, the DLL registration proceeds successfully) LoadLibraryA("msvcr90.dll") called from "c:\proj_py\gtxl\vba\dist_b\_CTYPES.PYD" at address 0x1D1A9742 by thread 1. LoadLibraryA("msvcr90.dll") returned NULL by thread 1. Error: %1 is not a valid Win32 application (193). I don't know what to make of this. Why would the LoadLibrary call from _ctypes.pyd not be directed to the DLL in winsxs as well? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jh_wang2004 at 163.com Fri Dec 26 09:25:18 2014 From: jh_wang2004 at 163.com (jh_wang2004) Date: Fri, 26 Dec 2014 16:25:18 +0800 (CST) Subject: [python-win32] COM event doesn't received Message-ID: <47bd700f.16c2c.14a85b327a7.Coremail.jh_wang2004@163.com> Hi all: I use win32com to receive a com event,but it does not work,the code is: import win32com.client import pythoncom import win32com.client.makepy class TrackingEvent(object): def IdentifyTire(self): print 'IdentifyTire event detected' def TireIsActivated(self, Tirecode, Customercode): print '***TireIsActivated Event***' class SystemEvent(object): def MainShutdown(self): print 'TQC Quit detected' def AlarmReceived(Caption='r1', Category='r2', Message='r3'): print 'alarm received!' mod = win32com.client.gencache.EnsureModule("{1CB6D73B-9242-42E7-86C0-E2E4B06B1419}", 0, 1, 0) print dir(mod) ob1 = mod.RQPTireTracking() ob3 = mod.RQPSystem() ob1_Tracking = win32com.client.DispatchWithEvents(ob1, TrackingEvent) ob3_System = win32com.client.DispatchWithEvents(ob3, SystemEvent) print 'machinetype is:', ob3_System.GetMachineType() pythoncom.PumpMessages() when the code running, it seems corectliy without error, invock method GetMachineType return a normal value, and .PumpMessages blocked for event receiving, but the two event handler does not receive any events, while at same time a VB and VC++ client using the same COM interface receive all events that COM broadcasts. I modify the code,directly dispatch the class without using gencache ob1_Tracking = win32com.client.DispatchWithEvents("UCI.RQPTireTracking", TrackingEvent) ob3_System = win32com.client.DispatchWithEvents("UCIRQPSystem", SystemEvent) it out put the same result as first one, So any one can give me a hit to track down this problem? Thanks a lot for your help Cheers, jianhua -------------- next part -------------- An HTML attachment was scrubbed... URL: From Gary.Scorby at dh.com Wed Dec 24 18:51:22 2014 From: Gary.Scorby at dh.com (Gary Scorby) Date: Wed, 24 Dec 2014 17:51:22 +0000 Subject: [python-win32] Compiler info Message-ID: <0BCA432F47999144AF7D51B1E7C0E4774686D3CF@DSM-SRV-MBX2.harlandfs.com> What version of Visual Studio is used to compile the current 219 download for Python 2.7? Thank you Gary Scorby [cid:image001.jpg at 01CF1D7E.4FA657A0] FINANCIAL TECHNOLOGIES. SOLUTIONS FOR PEOPLE.TM -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 761 bytes Desc: image001.jpg URL: From smitty1e at gmail.com Sat Dec 27 16:13:22 2014 From: smitty1e at gmail.com (Chris Smith) Date: Sat, 27 Dec 2014 10:13:22 -0500 Subject: [python-win32] python-win32 Digest, Vol 141, Issue 8 In-Reply-To: References: Message-ID: Also, is more than just a SourceForge account necessary to do a read-only checkout of the code? On Sat, Dec 27, 2014 at 6:00 AM, wrote: > Send python-win32 mailing list submissions to > python-win32 at python.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.python.org/mailman/listinfo/python-win32 > or, via email, send a message with subject or body 'help' to > python-win32-request at python.org > > You can reach the person managing the list at > python-win32-owner at python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of python-win32 digest..." > > > Today's Topics: > > 1. Compiler info (Gary Scorby) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 24 Dec 2014 17:51:22 +0000 > From: Gary Scorby > To: "python-win32 at python.org" > Subject: [python-win32] Compiler info > Message-ID: > < > 0BCA432F47999144AF7D51B1E7C0E4774686D3CF at DSM-SRV-MBX2.harlandfs.com> > Content-Type: text/plain; charset="us-ascii" > > What version of Visual Studio is used to compile the current 219 download > for Python 2.7? > > Thank you > > Gary Scorby > [cid:image001.jpg at 01CF1D7E.4FA657A0] > FINANCIAL TECHNOLOGIES. SOLUTIONS FOR PEOPLE.TM > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.python.org/pipermail/python-win32/attachments/20141224/cc7c27de/attachment-0001.html > > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: image001.jpg > Type: image/jpeg > Size: 761 bytes > Desc: image001.jpg > URL: < > http://mail.python.org/pipermail/python-win32/attachments/20141224/cc7c27de/attachment-0001.jpg > > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > https://mail.python.org/mailman/listinfo/python-win32 > > > ------------------------------ > > End of python-win32 Digest, Vol 141, Issue 8 > ******************************************** > -- History tells all of us that nobody gets a pass. Your [country's] perpetual existence is not guaranteed. If you do not believe in yourself, and believe that you're better than the alternative, and have the educational skills to come to that empirical judgment, then there is no reason for you to continue, and often you won't. --Victor Davis Hanson -------------- next part -------------- An HTML attachment was scrubbed... URL: From mail at timgolden.me.uk Sat Dec 27 21:25:52 2014 From: mail at timgolden.me.uk (Tim Golden) Date: Sat, 27 Dec 2014 20:25:52 +0000 Subject: [python-win32] python-win32 Digest, Vol 141, Issue 8 In-Reply-To: References: Message-ID: <549F15D0.90000@timgolden.me.uk> On 27/12/2014 15:13, Chris Smith wrote: > Also, is more than just a SourceForge account necessary to do a > read-only checkout of the code? To do a read-only checkout of the code, you don't even need a SourceForge account. Just clone it: hg clone http://pywin32.hg.sourceforge.net:8000/hgroot/pywin32/pywin32 The previous poster's question was: which version of VS is used to build pywin32. Since it's built via distutils, you would normally use the VS version which is used to build the version of Python you're running. For 2.6, 2.7 that's VS 2008; for 3.x that's VS 2010. (I can't remember if VS 2010 came in after 3.0). For 3.5, it's looking like any of 2010, 2013, 2015 will work but I haven't tested building against those yet; don't know if Mark has either. TJG From timr at probo.com Sat Dec 27 23:16:29 2014 From: timr at probo.com (Tim Roberts) Date: Sat, 27 Dec 2014 14:16:29 -0800 Subject: [python-win32] Compiler info In-Reply-To: <0BCA432F47999144AF7D51B1E7C0E4774686D3CF@DSM-SRV-MBX2.harlandfs.com> References: <0BCA432F47999144AF7D51B1E7C0E4774686D3CF@DSM-SRV-MBX2.harlandfs.com> Message-ID: On Dec 24, 2014, at 9:51 AM, Gary Scorby > wrote: What version of Visual Studio is used to compile the current 219 download for Python 2.7? Python 2.7 add-on modules need to be built with Visual Studio 2008. The base compiler is built with VS2008 and links to that version of the run-time library. Confusion results if you load a DLL that expects a different run-time DLL. ? Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kapileyes at gmail.com Mon Dec 29 10:20:54 2014 From: kapileyes at gmail.com (Kapil Dolas) Date: Mon, 29 Dec 2014 14:50:54 +0530 Subject: [python-win32] How to set value for multi-valued property using mapi? Message-ID: Hi, I want to set multiple values for multi-valued property using SetProps. SetProps takes list of tuples of tag and value as argument, where value should be string or unicode. How to set multiple values for multi-valued property in this case? Should I convert list of values to string or something like that? Regards, Kapil -------------- next part -------------- An HTML attachment was scrubbed... URL: From nick at packetfrenzy.com Tue Dec 30 11:28:47 2014 From: nick at packetfrenzy.com (Nick Czeczulin) Date: Tue, 30 Dec 2014 10:28:47 +0000 Subject: [python-win32] How to set value for multi-valued property using mapi? In-Reply-To: References: Message-ID: Kapil Dolas wrote: > I want to set multiple values for multi-valued property using SetProps. SetProps list > of tuples of tag and value as argument, where value should be string or unicode. > How to set multiple values for multi-valued property in this case? Should I convert list > of values to string or something like that? The multi-valued property's type specifies what the values being passed should be. The below example's named property happens to be PT_MV_UNICODE, so we get and set the values using unicode. >>> msg.GetProps((0x80a2101f,)) (0, ((2158104607L, (u'Orange category', u'Green category', u'Blue category')),)) >>> msg.SetProps( ((0x80a2101f,(u'Orange category', u'Green category', u'Blue category', u'Red category')),) ) (0, None) >>> msg.GetProps((0x80a2101f,)) (0, ((2158104607L, (u'Orange category', u'Green category', u'Blue category', u'Red category')),)) Hth, -nick