From colin_brice24 at yahoo.co.uk Fri Dec 2 11:42:35 2016 From: colin_brice24 at yahoo.co.uk (colin brice) Date: Fri, 2 Dec 2016 16:42:35 +0000 (UTC) Subject: [python-win32] File monitoring additional information user, process and PID References: <1721442667.8760298.1480696955462.ref@mail.yahoo.com> Message-ID: <1721442667.8760298.1480696955462@mail.yahoo.com> Hi All, I was wondering if anyone had ever been able to retrieve the username, process or PID for file changes, I am currently using the basis on the file monitor script taken from the Tim Golden website. If anyone has had any luck or can give clues of where I might start it would be much appreciated? Thanks!Col -------------- next part -------------- An HTML attachment was scrubbed... URL: From timr at probo.com Fri Dec 2 14:19:51 2016 From: timr at probo.com (Tim Roberts) Date: Fri, 2 Dec 2016 11:19:51 -0800 Subject: [python-win32] File monitoring additional information user, process and PID In-Reply-To: <1721442667.8760298.1480696955462@mail.yahoo.com> References: <1721442667.8760298.1480696955462.ref@mail.yahoo.com> <1721442667.8760298.1480696955462@mail.yahoo.com> Message-ID: <5ec52742-60d4-66b1-0ca1-53898f3b6d85@probo.com> colin brice via python-win32 wrote: > > I was wondering if anyone had ever been able to retrieve the username, > process or PID for file changes, I am currently using the basis on the > file monitor script taken from the Tim Golden website. Not possible. The Win32 API does not provide that information. You can go look it up; it is the FILE_NOTIFY_INFORMATION structure. All it tells you is that something about the file changed. It's up to you to figure out what changed, but there's no way to learn who made the change. After all, what if the change came from a process on a different computer? -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From douglas.sharkey at gmail.com Fri Dec 2 16:56:40 2016 From: douglas.sharkey at gmail.com (Doug Sharkey) Date: Fri, 2 Dec 2016 16:56:40 -0500 Subject: [python-win32] Help with com_error: (-2147352567, 'Exception occurred.', (0, u'Microsoft Excel', u"Microsoft Excel cannot access the file Message-ID: Hi all, This bit of code: objExcel = win32com.client.Dispatch("Excel.Application") objExcel.visible = False objExcel.DisplayAlerts = False objWb=objExcel.Workbooks.Open(filename) is producing this error: File ">", line 8, in Open com_error: (-2147352567, 'Exception occurred.', (0, u'Microsoft Excel', u"Microsoft Excel cannot access the file '\\\\Win-rfe2cu0ucdn\\EFT_Share\\EFT_ToBeProcessed\\ABCD\\MyFile.P'. There are several possible reasons:\n\n\u2022 The file name or path does not exist.\n\u2022 The file is being used by another program.\n\u2022 The workbook you are trying to save has the same name as a currently open workbook.", u'xlmain11.chm', 0, -2146827284), None) Note: 1. filename is fully qualified (filename=os.path.abspath(...)) 2. The file does exist 3. The file is not being used by another program 4. There is no other open workbook My environment is: - Windows Server 2012 R2, 64bit OS - Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:24:40) [MSC v.1500 64 bit (AMD64)] on win32 - pywin32-220.win-amd64-py2.7 - MIcrosoft Excel 2013, 64bit If I run it from my laptop (Windows 8.1 Enterprise, 64bit OS) it works fine. Any help is appreciated. I've been wracking my brain on this for the past 5 days. Thanks, Doug -------------- next part -------------- An HTML attachment was scrubbed... URL: From timr at probo.com Sun Dec 4 03:37:45 2016 From: timr at probo.com (Tim Roberts) Date: Sun, 4 Dec 2016 00:37:45 -0800 Subject: [python-win32] Help with com_error: (-2147352567, 'Exception occurred.', (0, u'Microsoft Excel', u"Microsoft Excel cannot access the file In-Reply-To: References: Message-ID: On Dec 2, 2016, at 1:56 PM, Doug Sharkey wrote: > > Hi all, > > This bit of code: > > objExcel = win32com.client.Dispatch("Excel.Application") > objExcel.visible = False > objExcel.DisplayAlerts = False > objWb=objExcel.Workbooks.Open(filename) > > is producing this error: > > File ">", line 8, in Open > com_error: (-2147352567, 'Exception occurred.', (0, u'Microsoft Excel', u"Microsoft Excel cannot access the file '\\\\Win-rfe2cu0ucdn\\EFT_Share\\EFT_ToBeProcessed\\ABCD\\MyFile.P'. What do you expect Excel to do with a file with the extension .P? ? Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From douglas.sharkey at gmail.com Sun Dec 4 12:17:20 2016 From: douglas.sharkey at gmail.com (Doug Sharkey) Date: Sun, 4 Dec 2016 12:17:20 -0500 Subject: [python-win32] python-win32 Digest, Vol 165, Issue 3 In-Reply-To: References: Message-ID: Hi Tim Appreciate the response. Although it has a .P extension it's actually an Excel spreadsheet (xlsx format). Business rules require the name format. I could rename it but I suspect the name isn't the issue since this code works fine on my 2008 laptop with the .P file. I'll try renaming it just to be sure. Thanks Doug On Dec 4, 2016 12:00 PM, 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. Re: Help with com_error: (-2147352567, 'Exception occurred.', > (0, u'Microsoft Excel', u"Microsoft Excel cannot access the file > (Tim Roberts) > > > ---------- Forwarded message ---------- > From: Tim Roberts > To: "python-win32 at python.org" > Cc: > Date: Sun, 4 Dec 2016 00:37:45 -0800 > Subject: Re: [python-win32] Help with com_error: (-2147352567, 'Exception > occurred.', (0, u'Microsoft Excel', u"Microsoft Excel cannot access the file > On Dec 2, 2016, at 1:56 PM, Doug Sharkey > wrote: > > > > Hi all, > > > > This bit of code: > > > > objExcel = win32com.client.Dispatch("Excel.Application") > > objExcel.visible = False > > objExcel.DisplayAlerts = False > > objWb=objExcel.Workbooks.Open(filename) > > > > is producing this error: > > > > File ">", line 8, in Open > > com_error: (-2147352567, 'Exception occurred.', (0, u'Microsoft Excel', > u"Microsoft Excel cannot access the file '\\\\Win-rfe2cu0ucdn\\EFT_ > Share\\EFT_ToBeProcessed\\ABCD\\MyFile.P'. > > What do you expect Excel to do with a file with the extension .P? > ? > Tim Roberts, timr at probo.com > Providenza & Boekelheide, Inc. > > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > https://mail.python.org/mailman/listinfo/python-win32 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From timr at probo.com Mon Dec 5 02:37:44 2016 From: timr at probo.com (Tim Roberts) Date: Sun, 4 Dec 2016 23:37:44 -0800 Subject: [python-win32] python-win32 Digest, Vol 165, Issue 3 In-Reply-To: References: Message-ID: On Dec 4, 2016, at 9:17 AM, Doug Sharkey wrote: > > Appreciate the response. Although it has a .P extension it's actually an Excel spreadsheet (xlsx format). Business rules require the name format. How does that make any sense at all? If you double-click on that file name, the system isn't going to know that it's supposed to bring up Excel. Excel only registers its well-known extensions. If you email that file to someone else, they won't know how to open it either. > I could rename it but I suspect the name isn't the issue since this code works fine on my 2008 laptop with the .P file. I'll try renaming it just to be sure. Is it possible your 2008 laptop had had the registry changes necessary to associate .P files with Excel, but your current laptop does not? ? Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From greg.ewing at canterbury.ac.nz Mon Dec 5 03:40:55 2016 From: greg.ewing at canterbury.ac.nz (Greg Ewing) Date: Mon, 05 Dec 2016 21:40:55 +1300 Subject: [python-win32] python-win32 Digest, Vol 165, Issue 3 In-Reply-To: References: Message-ID: <58452817.8070501@canterbury.ac.nz> Tim Roberts wrote: > Is it possible your 2008 laptop had had the registry changes necessary to > associate .P files with Excel, but your current laptop does not? He's running a program that explicitly tells Excel to open the file, so extension associations don't come into it. What matters is whether Excel uses the extension to tell what kind of file it is, or just looks at the contents. Possibly different versions of Excel behave differently in that regard. -- Greg From douglas.sharkey at gmail.com Mon Dec 5 20:48:14 2016 From: douglas.sharkey at gmail.com (Doug Sharkey) Date: Mon, 5 Dec 2016 20:48:14 -0500 Subject: [python-win32] Help with com_error: (-2147352567, 'Exception occurred.', (0, u'Microsoft Excel', u"Microsoft Excel cannot access the file Message-ID: I put the subject back to the original post. Greg has it correct. The VB code I'm calling doesn't care what the extension is, It can open any extension as long as the contents are a proper Excel spreadsheet. Thanks, Doug On Mon, Dec 5, 2016 at 12:00 PM, 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. Re: python-win32 Digest, Vol 165, Issue 3 (Doug Sharkey) > 2. Re: python-win32 Digest, Vol 165, Issue 3 (Tim Roberts) > 3. Re: python-win32 Digest, Vol 165, Issue 3 (Greg Ewing) > > > ---------- Forwarded message ---------- > From: Doug Sharkey > To: python-win32 at python.org > Cc: > Date: Sun, 4 Dec 2016 12:17:20 -0500 > Subject: Re: [python-win32] python-win32 Digest, Vol 165, Issue 3 > Hi Tim > > Appreciate the response. Although it has a .P extension it's actually an > Excel spreadsheet (xlsx format). Business rules require the name format. I > could rename it but I suspect the name isn't the issue since this code > works fine on my 2008 laptop with the .P file. I'll try renaming it just to > be sure. > > Thanks > > Doug > > > > On Dec 4, 2016 12:00 PM, 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. Re: Help with com_error: (-2147352567, 'Exception occurred.', >> (0, u'Microsoft Excel', u"Microsoft Excel cannot access the file >> (Tim Roberts) >> >> >> ---------- Forwarded message ---------- >> From: Tim Roberts >> To: "python-win32 at python.org" >> Cc: >> Date: Sun, 4 Dec 2016 00:37:45 -0800 >> Subject: Re: [python-win32] Help with com_error: (-2147352567 >> <(214)%20735-2567>, 'Exception occurred.', (0, u'Microsoft Excel', >> u"Microsoft Excel cannot access the file >> On Dec 2, 2016, at 1:56 PM, Doug Sharkey >> wrote: >> > >> > Hi all, >> > >> > This bit of code: >> > >> > objExcel = win32com.client.Dispatch("Excel.Application") >> > objExcel.visible = False >> > objExcel.DisplayAlerts = False >> > objWb=objExcel.Workbooks.Open(filename) >> > >> > is producing this error: >> > >> > File ">", line 8, in Open >> > com_error: (-2147352567, 'Exception occurred.', (0, u'Microsoft >> Excel', u"Microsoft Excel cannot access the file >> '\\\\Win-rfe2cu0ucdn\\EFT_Share\\EFT_ToBeProcessed\\ABCD\\MyFile.P'. >> >> What do you expect Excel to do with a file with the extension .P? >> ? >> Tim Roberts, timr at probo.com >> Providenza & Boekelheide, Inc. >> >> >> _______________________________________________ >> python-win32 mailing list >> python-win32 at python.org >> https://mail.python.org/mailman/listinfo/python-win32 >> >> > > ---------- Forwarded message ---------- > From: Tim Roberts > To: "python-win32 at python.org" > Cc: > Date: Sun, 4 Dec 2016 23:37:44 -0800 > Subject: Re: [python-win32] python-win32 Digest, Vol 165, Issue 3 > On Dec 4, 2016, at 9:17 AM, Doug Sharkey > wrote: > > > > Appreciate the response. Although it has a .P extension it's actually an > Excel spreadsheet (xlsx format). Business rules require the name format. > > How does that make any sense at all? If you double-click on that file > name, the system isn't going to know that it's supposed to bring up Excel. > Excel only registers its well-known extensions. If you email that file to > someone else, they won't know how to open it either. > > > > I could rename it but I suspect the name isn't the issue since this code > works fine on my 2008 laptop with the .P file. I'll try renaming it just to > be sure. > > Is it possible your 2008 laptop had had the registry changes necessary to > associate .P files with Excel, but your current laptop does not? > ? > Tim Roberts, timr at probo.com > Providenza & Boekelheide, Inc. > > > > ---------- Forwarded message ---------- > From: Greg Ewing > To: "python-win32 at python.org" > Cc: > Date: Mon, 05 Dec 2016 21:40:55 +1300 > Subject: Re: [python-win32] python-win32 Digest, Vol 165, Issue 3 > Tim Roberts wrote: > >> Is it possible your 2008 laptop had had the registry changes necessary to >> associate .P files with Excel, but your current laptop does not? >> > > He's running a program that explicitly tells Excel to open the > file, so extension associations don't come into it. What > matters is whether Excel uses the extension to tell what kind > of file it is, or just looks at the contents. Possibly different > versions of Excel behave differently in that regard. > > -- > Greg > > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > https://mail.python.org/mailman/listinfo/python-win32 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From planders at gmail.com Tue Dec 6 18:11:40 2016 From: planders at gmail.com (Preston Landers) Date: Tue, 6 Dec 2016 17:11:40 -0600 Subject: [python-win32] Inheritable sockets on Windows and multiprocessing Message-ID: Hello, Please excuse me if this is not the appropriate forum. I'm porting a Python 2.6 based application to Python 3.6. This app uses a customized version of the "flup" package to do FastCGI services on Windows using the multiprocessing package. This requires a few sockets to be inherited across processes - the main FastCGI protocol socket plus a control socket. In Python 2.6, the `socket.from_fd` function was not available on Windows. However I patched Python's socketmodule.c to provide that function using DuplicateHandle. In Python 2.6's version of multiprocessing it spawned a process with CreateProcess and bInheritHandles=True. This worked beautifully for me. Now I'm trying to get this working after moving from Python 2.6 to 3.6. Fortunately, the socket module now has a working `socket.from_fd` on Windows so I no longer have to patch that. Unfortunately for me, though, the multiprocessing module now calls CreateProcess with bInheritHandles=False. This causes my scenario to fail. Here's a short test script which illustrates this problem: https://gist.github.com/Preston-Landers/712fee10fb557cf0b5592b57561a7c08 If you run with an unpatched multiprocessing, it will fail with an error like: OSError: [WinError 10038] An operation was attempted on something that is not a socket If you patch multiprocessing to set bInheritHandles=True this now works. (Change is in popen_spawn_win32.py where it does _winapi.CreateProcess.) I'm sure there's a good reason for that change in multiprocessing, whether for security or for unrelated/undesired file handles being passed. https://www.python.org/dev/peps/pep-0446/#inheritance-of-file-descriptors-on-windows However it does break my scenario and I don't see a way to tell multiprocessing to allow certain handles to be inherited. The docs for multiprocessing say "In particular, unnecessary file descriptors and handles from the parent process will not be inherited." It would be nice to have a way to tell it that my sockets are "necessary." You would think that calling socket.set_inheritable(True) would do it. In fact you must do that, but you must also pass bInheritHandles=True to CreateProcess for it to actually work. I do realize I could be going about this completely wrong, though. But right now it looks like my immediate options are: a) Go ahead and patch my copy of popen_spawn_win32.py to allow inherited handles. b) Try to rewrite things to not use multiprocessing at all and directly spawn my processes instead. That's not attractive because multiprocessing otherwise does what I need to do. Are there any other options I'm missing? thanks, Preston From n.goeddel at satzweiss.com Tue Dec 6 09:44:39 2016 From: n.goeddel at satzweiss.com (=?UTF-8?Q?Nicolas_G=c3=b6ddel?=) Date: Tue, 6 Dec 2016 15:44:39 +0100 Subject: [python-win32] Open MS Word, execute specific Ribbon command Message-ID: <15750cf6-40bb-7e39-e482-004dbe2bd6d9@satzweiss.com> Hi there, I am able to start Word, open a file, find its window handle and the handle of the Ribbon. Now I want to switch to an other tab within the Ribbon and execute a specific command. It seems now that I need these API calls to do this directly without simulating key presses: - GetAccessibleObject - GetObjectByName Unfortunality I can not find them inside the pywin32 library. The code I am trying to convert to Python is this one: https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/07/18/15/86/AccessRibbonTab.zip The main problem is that I want to execute a Ribbon command which is provided by a third party Word plugin, namely axesPDF. This plugin does not provide an APIs to use it in a Word Macro or from external via command line. So all I can do is opening the file in Word, press that specific Ribbon button, save the file an quit Word. At the moment I am trying to use AccessibleObjectFromWindow from oleacc.dll but I neither don't know if that is the right direction nor how to access this API correctly with ctypes. I am still trying... ;-) -- Mit freundlichen Gr??en Nicolas G?ddel ---------------------------------------------------------------- Satzweiss.com Print, Web, Software GmbH Mainzer Stra?e 116 66121 Saarbruecken Tel. 06 81 / 6 55 60 Fax 06 81 / 6 55 70 ajw at satzweiss.com | www.satzweiss.com Sitz der Gesellschaft: Saarbr?cken | HRB 9126 USt.Id.Nr. DE138115193 Gesch?ftsf?hrer: Anja Jansen-Winkeln, Roman Jansen-Winkeln From planders at gmail.com Thu Dec 8 16:01:50 2016 From: planders at gmail.com (Preston Landers) Date: Thu, 08 Dec 2016 21:01:50 +0000 Subject: [python-win32] Inheritable sockets on Windows and multiprocessing In-Reply-To: References: Message-ID: Thanks to Eryk Sun who pointed out that you can now just directly pass the socket object to the child process in multiprocessing (instead of the fileno int). I confirmed that worked for my use case. http://bugs.python.org/issue28906 thanks, Preston On Tue, Dec 6, 2016 at 5:11 PM Preston Landers wrote: Hello, Please excuse me if this is not the appropriate forum. I'm porting a Python 2.6 based application to Python 3.6. This app uses a customized version of the "flup" package to do FastCGI services on Windows using the multiprocessing package. This requires a few sockets to be inherited across processes - the main FastCGI protocol socket plus a control socket. In Python 2.6, the `socket.from_fd` function was not available on Windows. However I patched Python's socketmodule.c to provide that function using DuplicateHandle. In Python 2.6's version of multiprocessing it spawned a process with CreateProcess and bInheritHandles=True. This worked beautifully for me. Now I'm trying to get this working after moving from Python 2.6 to 3.6. Fortunately, the socket module now has a working `socket.from_fd` on Windows so I no longer have to patch that. Unfortunately for me, though, the multiprocessing module now calls CreateProcess with bInheritHandles=False. This causes my scenario to fail. Here's a short test script which illustrates this problem: https://gist.github.com/Preston-Landers/712fee10fb557cf0b5592b57561a7c08 If you run with an unpatched multiprocessing, it will fail with an error like: OSError: [WinError 10038] An operation was attempted on something that is not a socket If you patch multiprocessing to set bInheritHandles=True this now works. (Change is in popen_spawn_win32.py where it does _winapi.CreateProcess.) I'm sure there's a good reason for that change in multiprocessing, whether for security or for unrelated/undesired file handles being passed. https://www.python.org/dev/peps/pep-0446/#inheritance-of-file-descriptors-on-windows However it does break my scenario and I don't see a way to tell multiprocessing to allow certain handles to be inherited. The docs for multiprocessing say "In particular, unnecessary file descriptors and handles from the parent process will not be inherited." It would be nice to have a way to tell it that my sockets are "necessary." You would think that calling socket.set_inheritable(True) would do it. In fact you must do that, but you must also pass bInheritHandles=True to CreateProcess for it to actually work. I do realize I could be going about this completely wrong, though. But right now it looks like my immediate options are: a) Go ahead and patch my copy of popen_spawn_win32.py to allow inherited handles. b) Try to rewrite things to not use multiprocessing at all and directly spawn my processes instead. That's not attractive because multiprocessing otherwise does what I need to do. Are there any other options I'm missing? thanks, Preston -------------- next part -------------- An HTML attachment was scrubbed... URL: From Chris.Helvig at dsvolition.com Tue Dec 13 16:15:31 2016 From: Chris.Helvig at dsvolition.com (Chris Helvig) Date: Tue, 13 Dec 2016 21:15:31 +0000 Subject: [python-win32] Problem building pywin32 for Python 3.5 on VS2015 with Windows SDK 10 Message-ID: <1055b34b55ae4228a320151532c5247b@voliexmb02.dsvolition.com> Hi! So I'm having trouble rebuilding pywin32. It seems like the Windows 10 SDK is different from what is expected by the latest version of pywin32. Is that correct? Should I just attempt to fix it myself, or is there something obvious I'm doing wrong? Here's what happens if I build normally. Found version 0xa00 in C:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\shared\SDKDDKVER.H setup.py:1207: ResourceWarning: unclosed file <_io.TextIOWrapper name='C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.10586.0\\shared\\SDKDDKVER.H' mode='r' encoding='cp1252'> why = self._why_cant_build_extension(ext) building 'win32job' extension swigging win32/src/win32job.i to win32/src/win32job_swig.cpp D:\projects\ctg\python3\ctg\src\vendor\PythonExtensions\pywin32\swig\swig.exe -python -c++ -dnone -DSWIG_PY64BIT -o D:\projects\ctg\python3\ctg\src\vendor\PythonExtensions\pywin32\win32\src\win32job_swig.cpp D:\projects\ctg\python3\ctg\src\vendor\PythonExtensions\pywin32\win32\src\win32job.i Generating wrappers for Python C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe /c /nologo /Od /MDd /W3 /GS- /Z7 /D_DEBUG -DDISTUTILS_BUILD -D_CRT_SECURE_NO_WARNINGS -Icom/win32com/src/include -Iwin32/src -Id:\projects\ctg\python3\ctg\publish\python\include -Id:\projects\ctg\python3\ctg\publish\python\include /TpD:\projects\ctg\python3\ctg\src\vendor\PythonExtensions\pywin32\win32\src\win32job_swig.cpp /Fobuild\temp.win-amd64-3.5-pydebug\Debug\win32/src/win32job_swig.obj /Fdbuild\temp.win-amd64-3.5-pydebug\Debug\win32job_vc.pdb /EHsc /DUNICODE /D_UNICODE /DWINNT win32job_swig.cpp D:\projects\ctg\python3\ctg\src\vendor\PythonExtensions\pywin32\win32\src\win32job_swig.cpp(1247): error C2065: 'JOB_OBJECT_RESERVED_LIMIT_VALID_FLAGS': undeclared identifier D:\projects\ctg\python3\ctg\src\vendor\PythonExtensions\pywin32\win32\src\win32job_swig.cpp(1247): error C2660: 'PyDict_SetItemString': function does not take 2 arguments error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64\\cl.exe' failed with exit status 2xc If I delete the following line (462) from win32job.i, I can get a fair bit further: #define JOB_OBJECT_RESERVED_LIMIT_VALID_FLAGS JOB_OBJECT_RESERVED_LIMIT_VALID_FLAGS Then, I get a bunch of errors that look like this: building 'axdebug' extension C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe /c /nologo /Od /W3 /GS- /Z7 /D_DEBUG /MDd -DDISTUTILS_BUILD -D_CRT_SECURE_NO_WARNINGS -Icom/win32com/src/include -Iwin32/src -Id:\projects\ctg\python3\ctg\publish\python\include -Id:\projects\ctg\python3\ctg\publish\python\include /TpD:\projects\ctg\python3\ctg\src\vendor\PythonExtensions\pywin32\com\win32comext\axdebug\src\AXDebug.cpp /Fobuild\temp.win-amd64-3.5-pydebug\Debug\com/win32comext/axdebug/src/AXDebug.obj /Fpbuild\temp.win-amd64-3.5-pydebug\Debug\axdebug.pch /Fdbuild\temp.win-amd64-3.5-pydebug\Debug\axdebug_vc.pdb /EHsc /DUNICODE /D_UNICODE /DWINNT AXDebug.cpp d:\projects\ctg\python3\ctg\src\vendor\pythonextensions\pywin32\com\win32comext\axdebug\src\stdafx.h(32): error C2365: 'DBGPROP_ATTRIB_NO_ATTRIB': redefinition; previous definition was 'enumerator' C:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\um\dbgprop.h(137): note: see declaration of 'DBGPROP_ATTRIB_NO_ATTRIB' d:\projects\ctg\python3\ctg\src\vendor\pythonextensions\pywin32\com\win32comext\axdebug\src\stdafx.h(33): error C2365: 'DBGPROP_ATTRIB_VALUE_IS_INVALID': redefinition; previous definition was 'enumerator' If I go into com/win32comext/AXDebug/src/stdafx.h, and change line 29 from: #if defined(__REQUIRED_RPCNDR_H_VERSION__) To #if 0 Then I can get even further. But then it dies again later, complaining about undefined symbols. I can fix that by going to line 369 of AXDebug.cpp, and changing them from this: ADD_CONSTANT(EX_DBGPROP_INFO_ID); // @const axdebug|EX_DBGPROP_INFO_ID| ADD_CONSTANT(EX_DBGPROP_INFO_NTYPE); // @const axdebug|EX_DBGPROP_INFO_NTYPE| ADD_CONSTANT(EX_DBGPROP_INFO_NVALUE); // @const axdebug|EX_DBGPROP_INFO_NVALUE| ADD_CONSTANT(EX_DBGPROP_INFO_LOCKBYTES); // @const axdebug|EX_DBGPROP_INFO_LOCKBYTES| ADD_CONSTANT(EX_DBGPROP_INFO_DEBUGEXTPROP); // @const axdebug|EX_DBGPROP_INFO_DEBUGEXTPROP| To this: ADD_CONSTANT(EX_PROP_INFO_ID); // @const axdebug|EX_PROP_INFO_ID| ADD_CONSTANT(EX_PROP_INFO_NTYPE); // @const axdebug|EX_PROP_INFO_NTYPE| ADD_CONSTANT(EX_PROP_INFO_NVALUE); // @const axdebug|EX_PROP_INFO_NVALUE| ADD_CONSTANT(EX_PROP_INFO_LOCKBYTES); // @const axdebug|EX_PROP_INFO_LOCKBYTES| ADD_CONSTANT(EX_PROP_INFO_DEBUGEXTPROP); // @const axdebug|EX_PROP_INFO_DEBUGEXTPROP| Fixing that, it dies in linking axdebug. And at this point, I have to ask if I'm doing something wrong. We should be on the latest published version of pywin32, so I'm a bit surprised that I'm needing to fix all these compile errors. Is that expected? Thanks for any assistance! Chris ________________________________ This e-mail may contain CONFIDENTIAL AND PROPRIETARY INFORMATION and/or PRIVILEGED AND CONFIDENTIAL COMMUNICATION intended solely for the recipient and, therefore, may not be retransmitted to any party outside of the recipient's organization without the prior written consent of the sender. If you have received this e-mail in error please notify the sender immediately by telephone or reply e-mail and destroy the original message without making a copy. Deep Silver, Inc. accepts no liability for any losses or damages resulting from infected e-mail transmissions and viruses in e-mail attachments. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bgailer at gmail.com Sat Dec 17 11:16:32 2016 From: bgailer at gmail.com (bob gailer) Date: Sat, 17 Dec 2016 11:16:32 -0500 Subject: [python-win32] What is happening with bug report 727? Message-ID: <1ab800a7-54d6-2d9a-768a-0255d4e821e2@gmail.com> This has been plaguing me for months. I was surprised today to find only one entry for this problem, reported 08/02/2016, with no comments (other than mine). Please let me know the status, and ideally when it will be fixed.