From hartmut.niemann at siemens.com Fri Mar 8 17:43:25 2013 From: hartmut.niemann at siemens.com (Niemann, Hartmut) Date: Fri, 8 Mar 2013 17:43:25 +0100 Subject: [python-win32] Makepy for Access on Win7 Message-ID: Hello! I had to switch from Windows XP to Windows 7 and redo my python installation there. I need to generate COM modules for Microsoft products I use. When running makepy on Windows 7 / Python 2.7.3 (64bit) / pywin32-218.win-amd64-py2.7.exe for Microsoft Access 12, I get: >>> Generating to D:\bin\Python27\lib\site-packages\win32com\gen_py\4AFFC9A0-5F99-101B-AF4E-00AA003F0F07x0x9x0.py Building definitions from type library... Failed to execute command: from win32com.client import makepy;makepy.main() Traceback (most recent call last): File "D:\bin\Python27\Lib\site-packages\pythonwin\pywin\framework\toolmenu.py", line 103, in HandleToolCommand exec "%s\n" % pyCmd File "", line 1, in File "D:\bin\Python27\lib\site-packages\win32com\client\makepy.py", line 380, in main GenerateFromTypeLibSpec(arg, f, verboseLevel = verboseLevel, bForDemand = bForDemand, bBuildHidden = hiddenSpec) File "D:\bin\Python27\lib\site-packages\win32com\client\makepy.py", line 279, in GenerateFromTypeLibSpec gen.generate(fileUse, bForDemand) File "D:\bin\Python27\lib\site-packages\win32com\client\genpy.py", line 819, in generate self.do_generate() File "D:\bin\Python27\lib\site-packages\win32com\client\genpy.py", line 882, in do_generate oleItems, enumItems, recordItems, vtableItems = self.BuildOleItemsFromType() File "D:\bin\Python27\lib\site-packages\win32com\client\genpy.py", line 757, in BuildOleItemsFromType for type_info_tuple in self.CollectOleItemInfosFromType(): File "D:\bin\Python27\lib\site-packages\win32com\client\genpy.py", line 679, in CollectOleItemInfosFromType attr = info.GetTypeAttr() com_error: (-2147312566, 'Fehler beim Laden der Typbibliothek/DLL.', None, None) The other two com modules (ADO and Excel) had no problem. What could that be? With best regards Hartmut Niemann -------------- next part -------------- An HTML attachment was scrubbed... URL: From timr at probo.com Fri Mar 8 18:58:41 2013 From: timr at probo.com (Tim Roberts) Date: Fri, 8 Mar 2013 09:58:41 -0800 Subject: [python-win32] Makepy for Access on Win7 In-Reply-To: References: Message-ID: <513A26D1.6070606@probo.com> Niemann, Hartmut wrote: > > I had to switch from Windows XP to Windows 7 and redo my python > installation there. > I need to generate COM modules for Microsoft products I use. > > When running makepy on Windows 7 / Python 2.7.3 (64bit) / > pywin32-218.win-amd64-py2.7.exe for > Microsoft Access 12, I get: > ... > com_error: (-2147312566, 'Fehler beim Laden der Typbibliothek/DLL.', > None, None) That is 80029C4A, which is TYPE_E_CANTLOADLIBRARY. You aren't going to like this answer. It looks like you have 64-bit Python, but 32-bit Office. You can't load a 32-bit DLL into a 64-bit process. Now, most of the 32-bit Office components have a 64-bit proxy available to make that crossover, so you can invoke them from 64-bit processes. For whatever reason, it appears that Access does not do this. Even worse, you can't install 64-bit Access if you already have 32-bit Office installed. There is some indication that this might help: http://www.microsoft.com/en-us/download/details.aspx?id=23734 but I think you are in for some painful Google time. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From vernondcole at gmail.com Fri Mar 8 19:37:55 2013 From: vernondcole at gmail.com (Vernon D. Cole) Date: Fri, 8 Mar 2013 11:37:55 -0700 Subject: [python-win32] Makepy for Access on Win7 In-Reply-To: <513A26D1.6070606@probo.com> References: <513A26D1.6070606@probo.com> Message-ID: Hartmut: If what you are doing is copying data between an ACCESS table and something else that can be reached from ADO, you might want to consider doing the entire thing from Python using adodbapi. You can do that without even having a copy of Office on your computer. You can glean the connection information from your sitepackages/adodbapi/tests folder. If, on the other hand, you are controlling ACCESS in some more advanced manner, then just install the 32 bit versions of Python and pywin32. They will work just fine on your 64bit Windows, and will be able to talk to their 32bit friends via COM. -- Vernon On Fri, Mar 8, 2013 at 10:58 AM, Tim Roberts wrote: > Niemann, Hartmut wrote: > > > > I had to switch from Windows XP to Windows 7 and redo my python > > installation there. > > I need to generate COM modules for Microsoft products I use. > > > > When running makepy on Windows 7 / Python 2.7.3 (64bit) / > > pywin32-218.win-amd64-py2.7.exe for > > Microsoft Access 12, I get: > > ... > > com_error: (-2147312566, 'Fehler beim Laden der Typbibliothek/DLL.', > > None, None) > > That is 80029C4A, which is TYPE_E_CANTLOADLIBRARY. You aren't going to > like this answer. > > It looks like you have 64-bit Python, but 32-bit Office. You can't load > a 32-bit DLL into a 64-bit process. Now, most of the 32-bit Office > components have a 64-bit proxy available to make that crossover, so you > can invoke them from 64-bit processes. For whatever reason, it appears > that Access does not do this. Even worse, you can't install 64-bit > Access if you already have 32-bit Office installed. > > There is some indication that this might help: > http://www.microsoft.com/en-us/download/details.aspx?id=23734 > but I think you are in for some painful Google time. > > -- > Tim Roberts, timr at probo.com > Providenza & Boekelheide, Inc. > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > http://mail.python.org/mailman/listinfo/python-win32 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damien.reboul-salze at totsa.com Mon Mar 18 18:56:28 2013 From: damien.reboul-salze at totsa.com (Damien REBOUL-SALZE) Date: Mon, 18 Mar 2013 18:56:28 +0100 Subject: [python-win32] problem when importing dde module [python3.2 32 bits with pywin32 version 218] Message-ID: Hello, I have seen this issue reported already but couldn't find its proper fix: Python 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)] on win 32 Type "help", "copyright", "credits" or "license" for more information. >>> import win32ui >>> import dde Traceback (most recent call last): File "", line 1, in ImportError: This must be an MFC application - try 'import win32ui' first Could you possibly help me out on this or give me a link to where this issue has been solved? Thx a lot Damien -------------- next part -------------- An HTML attachment was scrubbed... URL: From goodger at python.org Sat Mar 23 18:07:10 2013 From: goodger at python.org (David Goodger) Date: Sat, 23 Mar 2013 12:07:10 -0500 Subject: [python-win32] USB device tree physical topology Message-ID: Hi all, I'm working on a project where my Win32 (Win XP and above) will communicate with a custom hardware device. The device is equivalent to a USB hub with an SD card reader and a serial-to-USB adapter attached. My app will communicate with the device via serial-over-USB and interact with the SD card. My problem is in figuring out which SD card goes with which serial adaptor. There could be multiple devices attached, or other serial adapters or SD card readers attached to the same PC, and I cannot assume that any SD card is the one that goes with the device. How can I determine the physical layout of the USB device tree from Python? Put another way, how can I get a list of devices physically attached to a specific USB hub? When I look at my device using the Windows Device Manager (C:\WINDOWS\System32\devmgmt.msc), I see the physical layout (View -> Devices by connection). If I right-click on the USB hub at the root of my device, choose Properties, Details tab, Bus Relations from the list, I see the sub-devices attached to the USB hub. So the info exists withing Windows. How can I access this from Python? Any tips would be welcome, and especially example code (no matter how simple). I have tried a bunch of things, but I probably missed the obvious-in-hindsight. Please provide me that hindsight! -- David Goodger From vernondcole at gmail.com Mon Mar 25 11:30:11 2013 From: vernondcole at gmail.com (Vernon D. Cole) Date: Mon, 25 Mar 2013 04:30:11 -0600 Subject: [python-win32] (only in Python 3) decimal.Decimal cannot be converted to a COM VARIENT Message-ID: Guys: I am starting work on an upgrade to adodbapi -- so I set up a new improved test layout and started running some baseline tests before changing any application code. I just tripped across this one: I don't know whether it is actually new or whether my new tests exposed something which has been there a long time and never noticed. The interesting thing is that this does not occur on Python 2 (whether or not I am running 64 bit Python) -- I only see it on Python 3.3 64 bit. I have not tried any other Python 3 versions yet. I am ready to provide more or better (small example) test cases if that would help, but if one of you can see what's wrong from just this clip, I will spend my time elsewhere. What other info would be useful when I submit the ticket? -- Vernon Cole [Note: this is the hg tip from sf.net/projects/adodbapi -- not the copy in /pywin32. I don't want to update that until this is completely working. ] C:\Users\vernon\PycharmProjects\adodbapi\test>c:\python33\python.exe adodbapitest.py 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:57:17) [MSC v.1600 64 bit (AMD64)] node=z-PC: is64bit.os()= True, is64bit.Python()= True [...clip...] ERROR: testDataTypeMoney (__main__.TestADOwithAccessDB) ---------------------------------------------------------------------- Traceback (most recent call last): File "c:\users\vernon\appdata\local\temp\adotest_k0ojue\adodbapi\adodbapi.py", line 969, in _buildADOparameterList _configure_parameter(p, value, self.parameters_known) File "c:\users\vernon\appdata\local\temp\adotest_k0ojue\adodbapi\adodbapi.py", line 403, in _configure_parameter p.Value = value File "c:\python33\lib\site-packages\win32com\client\dynamic.py", line 560, in __setattr__ self._oleobj_.Invoke(entry.dispid, 0, invoke_type, 0, value) TypeError: Objects of type 'decimal.Decimal' can not be converted to a COM VARIANT -------------- next part -------------- An HTML attachment was scrubbed... URL: From rupole at hotmail.com Mon Mar 25 14:28:33 2013 From: rupole at hotmail.com (Roger Upole) Date: Mon, 25 Mar 2013 09:28:33 -0400 Subject: [python-win32] (only in Python 3) decimal.Decimal cannot beconverted to a COM VARIENT References: Message-ID: Looks like it's due to way the type is name-checked (oleargs.cpp, line 263): else if (strcmp(obj->ob_type->tp_name, "Decimal")==0) That doesn't work in 3.3 anymore. However, the function it calls to do the actual conversion has already been modified to use an isinstance check instead so it shouldn't be too difficult to fix. Roger "Vernon D. Cole" wrote in message news:CAH-ZgAcOXMUHR+8_gsHS89h6cURzLovhUnauMsnz=bhjsFnpBw at mail.gmail.com... > Guys: > I am starting work on an upgrade to adodbapi -- so I set up a new > improved test layout and started > running some baseline tests before changing any application code. I just > tripped across this one: I don't know whether it is actually new or whether > my new tests exposed something which has been there a long time and never > noticed. The interesting thing is that this does not occur on Python 2 > (whether or not I am running 64 bit Python) -- I only see it on Python 3.3 > 64 bit. I have not tried any other Python 3 versions yet. > > I am ready to provide more or better (small example) test cases if that > would help, but if one of you can see what's wrong from just this clip, I > will spend my time elsewhere. What other info would be useful when I > submit the ticket? > -- > Vernon Cole > > [Note: this is the hg tip from sf.net/projects/adodbapi -- not the copy in > /pywin32. I don't want to update that until this is completely working. ] > > > C:\Users\vernon\PycharmProjects\adodbapi\test>c:\python33\python.exe > adodbapitest.py > 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:57:17) [MSC v.1600 64 bit > (AMD64)] > node=z-PC: is64bit.os()= True, is64bit.Python()= True > [...clip...] > ERROR: testDataTypeMoney (__main__.TestADOwithAccessDB) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "c:\users\vernon\appdata\local\temp\adotest_k0ojue\adodbapi\adodbapi.py", > line 969, in _buildADOparameterList > _configure_parameter(p, value, self.parameters_known) > File > "c:\users\vernon\appdata\local\temp\adotest_k0ojue\adodbapi\adodbapi.py", > line 403, in _configure_parameter > p.Value = value > File "c:\python33\lib\site-packages\win32com\client\dynamic.py", line > 560, in > __setattr__ > self._oleobj_.Invoke(entry.dispid, 0, invoke_type, 0, value) > TypeError: Objects of type 'decimal.Decimal' can not be converted to a COM > VARIANT > > -------------------------------------------------------------------------------- > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > http://mail.python.org/mailman/listinfo/python-win32 > From timr at probo.com Mon Mar 25 20:15:08 2013 From: timr at probo.com (Tim Roberts) Date: Mon, 25 Mar 2013 12:15:08 -0700 Subject: [python-win32] USB device tree physical topology In-Reply-To: References: Message-ID: <5150A23C.80408@probo.com> David Goodger wrote: > I'm working on a project where my Win32 (Win XP and above) will > communicate with a custom hardware device. The device is equivalent to > a USB hub with an SD card reader and a serial-to-USB adapter attached. > My app will communicate with the device via serial-over-USB and > interact with the SD card. > > My problem is in figuring out which SD card goes with which serial > adaptor. There could be multiple devices attached, or other serial > adapters or SD card readers attached to the same PC, and I cannot > assume that any SD card is the one that goes with the device. > > How can I determine the physical layout of the USB device tree from > Python? Put another way, how can I get a list of devices physically > attached to a specific USB hub? Ugly. That will be the word for whatever solution you come up with. There are actually several different ways in which this task will be ugly. Windows does have several low-level APIs to extract information about devices, but it's quite difficult for a user-mode application to get information about how those device relate to each other. That's partly because such information is delicate; it's relying on behavior that tends to be transient, machine dependent, and even operating system dependent. It's possible to go enumerate all of the USB hubs in the system, using the SetupDi APIs. It's also possible to query each hub about the things that are plugged into to, using custom ioctls. The "usbview" application from the Windows Driver Kit (WDK) does this, and its source code is available. (A newer version is called "uvcview".) However, even that is not going to be enough for what you need to do. That will tell you the USB vendor and product IDs of the plugged-in devices. But what YOU want is (I suspect) is the COM port name of the fake serial adapter, and the drive letter of the partition on the volume on the SD card. Both of those tasks are tricky. Everything that you can do in Device Manager can be done with the SetupDi APIs, in setupapi.h. The WDK also contains the source for an application called "devcon" that shows how to use them. They are quite verbose, and I don't know whether there is a Python binding for them. I write Windows USB drivers for a living, so I'm pretty well steeped in this. You can try asking some followup questions, and I'll see if I can't lead you down a rose-colored path. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From mail at timgolden.me.uk Mon Mar 25 21:32:31 2013 From: mail at timgolden.me.uk (Tim Golden) Date: Mon, 25 Mar 2013 20:32:31 +0000 Subject: [python-win32] USB device tree physical topology In-Reply-To: <5150A23C.80408@probo.com> References: <5150A23C.80408@probo.com> Message-ID: <5150B45F.1040301@timgolden.me.uk> On 25/03/2013 19:15, Tim Roberts wrote: > I write Windows USB drivers for a living, so I'm pretty well steeped in > this. You can try asking some followup questions, and I'll see if I > can't lead you down a rose-colored path. Is that a cross between wearing Rose-tinted Spectacles and leading someone Up the Garden Path? [assuming that both of those expressions are used in the same way on the other side of the Atlantic...] TJG From timr at probo.com Mon Mar 25 22:54:21 2013 From: timr at probo.com (Tim Roberts) Date: Mon, 25 Mar 2013 14:54:21 -0700 Subject: [python-win32] USB device tree physical topology In-Reply-To: <5150B45F.1040301@timgolden.me.uk> References: <5150A23C.80408@probo.com> <5150B45F.1040301@timgolden.me.uk> Message-ID: <5150C78D.9080603@probo.com> Tim Golden wrote: > On 25/03/2013 19:15, Tim Roberts wrote: >> I write Windows USB drivers for a living, so I'm pretty well steeped in >> this. You can try asking some followup questions, and I'll see if I >> can't lead you down a rose-colored path. > Is that a cross between wearing Rose-tinted Spectacles and leading > someone Up the Garden Path? Yeah, after I wrote it, I realized that it wasn't really the idiom I wanted to use. "Down the primrose path" is the expression I was reaching for. Shame on me. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From esj at harvee.org Mon Mar 25 22:54:40 2013 From: esj at harvee.org (Eric Johansson) Date: Mon, 25 Mar 2013 17:54:40 -0400 Subject: [python-win32] USB device tree physical topology In-Reply-To: <5150B45F.1040301@timgolden.me.uk> References: <5150A23C.80408@probo.com> <5150B45F.1040301@timgolden.me.uk> Message-ID: <5150C7A0.9050602@harvee.org> On 3/25/2013 4:32 PM, Tim Golden wrote: > On 25/03/2013 19:15, Tim Roberts wrote: >> I write Windows USB drivers for a living, so I'm pretty well steeped in >> this. You can try asking some followup questions, and I'll see if I >> can't lead you down a rose-colored path. > > Is that a cross between wearing Rose-tinted Spectacles and leading > someone Up the Garden Path? Only if you are Pollyanna. http://en.wikipedia.org/wiki/Pollyanna From vernondcole at gmail.com Tue Mar 26 10:33:44 2013 From: vernondcole at gmail.com (Vernon D. Cole) Date: Tue, 26 Mar 2013 03:33:44 -0600 Subject: [python-win32] Dropping support for Python 2.3? Message-ID: Perhaps it is time... I found a copy of Python 2.3 to load onto a new computer in order to test my software, but it was not easy. It is in the small print about four pages down from the download page on python.org. I was one of 432 people who have downloaded the 2.3 installer for pywin32 build 218. Compared with 121,351 downloaded installers for Python 3.3 and 2.7 combined, 431 is 0.35 percent of our users. I discounted myself, because the only reason I downloaded the package was to make sure I have not broken something by using a new feature. I wonder how many of the others of that 432 are for similar reasons. Most, I would bet. Supporting that zero point three percent is costly, in terms of lost features. Adodbapi is not a large module, but there are half a dozen places in it which deal specifically with Python 2.3 -- such as "import win32com.decimal.decimal_23 as decimal" for example. There are two places which work around not having generator expressions, and a big question in the comments about handling the difference between long and int integers, and whether that is done correctly. There is also a confusing code block for float conversion with commas versus dots. All of that goes away if I simply change the "all versions of CPython later than,,," line. The important differences in Python 2.4 * decimal.Decimal * generator expressions * built in set objects * Decorators * unified integers * locale-independent float/string conversion * reverse iteration I am starting an informal poll... Is it really worthwhile to keep maintaining support for Python 2.3, which was released in 2005 and has not been updated since 2008? -- Vernon -------------- next part -------------- An HTML attachment was scrubbed... URL: From haraldarminmassa at gmail.com Tue Mar 26 10:42:42 2013 From: haraldarminmassa at gmail.com (Harald Armin Massa[legacy]) Date: Tue, 26 Mar 2013 10:42:42 +0100 Subject: [python-win32] Dropping support for Python 2.3? In-Reply-To: References: Message-ID: > Is it really worthwhile to keep maintaining support for Python 2.3, which > was released in 2005 and has not been updated since 2008? my vote: keep the running versions, aka builds up to now downloadable. Drop the support for more modern builds of PythonWin32. Whoever is forced to work with Python2.3, will not really be justified to expect being able to access Windows 8 features. Best wishes, Harald -- LightningTalkMan a brand of GHUM GmbH Spielberger Stra?e 49 70435 Stuttgart 0173/9409607 From mail at timgolden.me.uk Tue Mar 26 10:45:16 2013 From: mail at timgolden.me.uk (Tim Golden) Date: Tue, 26 Mar 2013 09:45:16 +0000 Subject: [python-win32] Dropping support for Python 2.3? In-Reply-To: References: Message-ID: <51516E2C.5040805@timgolden.me.uk> [re supporting 2.3 for adodbapi] Ditch it, I say. I think the minimum I test against for any of my stuff is 2.4 -- and I'm more and more inclined towards 2.6+. As you say, there's a small but definite overhead, the more so as we support 2.x and 3.x from the same codebase. (I have to do some fancy footwork in one test to avoid even importing a test support module under 3.x which is needed for 2.x). TJG From rupole at hotmail.com Tue Mar 26 13:36:43 2013 From: rupole at hotmail.com (Roger Upole) Date: Tue, 26 Mar 2013 08:36:43 -0400 Subject: [python-win32] Dropping support for Python 2.3? References: Message-ID: I'm wholeheartedly in favor of dropping it. Changes in the Python's C api since 2.3 are a major pain when building extension modules. Also, the compiler it's built with (VC6) has many incompatibilities with the newer versions of Visual Studio. Roger From skippy.hammond at gmail.com Tue Mar 26 13:37:19 2013 From: skippy.hammond at gmail.com (Mark Hammond) Date: Tue, 26 Mar 2013 23:37:19 +1100 Subject: [python-win32] Dropping support for Python 2.3? In-Reply-To: References: Message-ID: <5151967F.3020006@gmail.com> I've been happy to drop support for a couple of years, but while it kept working I kept building it :) I can't recall if 2.4 is built with vc6 too - if so, we might as well kill that too. Cheers, Mark. On 26/03/2013 8:33 PM, Vernon D. Cole wrote: > Perhaps it is time... > > I found a copy of Python 2.3 to load onto a new computer in order to > test my software, but it was not easy. It is in the small print about > four pages down from the download page on python.org > . I was one of 432 people who have downloaded the > 2.3 installer for pywin32 build 218. Compared with 121,351 downloaded > installers for Python 3.3 and 2.7 combined, 431 is 0.35 percent of our > users. I discounted myself, because the only reason I downloaded the > package was to make sure I have not broken something by using a new > feature. I wonder how many of the others of that 432 are for similar > reasons. Most, I would bet. > > Supporting that zero point three percent is costly, in terms of lost > features. Adodbapi is not a large module, but there are half a dozen > places in it which deal specifically with Python 2.3 -- such as "import > win32com.decimal.decimal_23 as decimal" for example. There are two > places which work around not having generator expressions, and a big > question in the comments about handling the difference between long and > int integers, and whether that is done correctly. There is also a > confusing code block for float conversion with commas versus dots. All > of that goes away if I simply change the "all versions of CPython later > than,,," line. > > The important differences in Python 2.4 > * decimal.Decimal > * generator expressions > * built in set objects > * Decorators > * unified integers > * locale-independent float/string conversion > * reverse iteration > > I am starting an informal poll... > > Is it really worthwhile to keep maintaining support for Python 2.3, > which was released in 2005 and has not been updated since 2008? > -- > Vernon > > > > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > http://mail.python.org/mailman/listinfo/python-win32 > From kris at rhs.com Tue Mar 26 13:44:45 2013 From: kris at rhs.com (Kris Hardy) Date: Tue, 26 Mar 2013 08:44:45 -0400 Subject: [python-win32] Dropping support for Python 2.3? In-Reply-To: <5151967F.3020006@gmail.com> References: <5151967F.3020006@gmail.com> Message-ID: +1 Mark Hammond wrote: >I've been happy to drop support for a couple of years, but while it >kept >working I kept building it :) I can't recall if 2.4 is built with vc6 >too - if so, we might as well kill that too. > >Cheers, > >Mark. > >On 26/03/2013 8:33 PM, Vernon D. Cole wrote: >> Perhaps it is time... >> >> I found a copy of Python 2.3 to load onto a new computer in order to >> test my software, but it was not easy. It is in the small print >about >> four pages down from the download page on python.org >> . I was one of 432 people who have downloaded the >> 2.3 installer for pywin32 build 218. Compared with 121,351 >downloaded >> installers for Python 3.3 and 2.7 combined, 431 is 0.35 percent of >our >> users. I discounted myself, because the only reason I downloaded the >> package was to make sure I have not broken something by using a new >> feature. I wonder how many of the others of that 432 are for similar >> reasons. Most, I would bet. >> >> Supporting that zero point three percent is costly, in terms of lost >> features. Adodbapi is not a large module, but there are half a dozen >> places in it which deal specifically with Python 2.3 -- such as >"import >> win32com.decimal.decimal_23 as decimal" for example. There are two >> places which work around not having generator expressions, and a big >> question in the comments about handling the difference between long >and >> int integers, and whether that is done correctly. There is also a >> confusing code block for float conversion with commas versus dots. >All >> of that goes away if I simply change the "all versions of CPython >later >> than,,," line. >> >> The important differences in Python 2.4 >> * decimal.Decimal >> * generator expressions >> * built in set objects >> * Decorators >> * unified integers >> * locale-independent float/string conversion >> * reverse iteration >> >> I am starting an informal poll... >> >> Is it really worthwhile to keep maintaining support for Python 2.3, >> which was released in 2005 and has not been updated since 2008? >> -- >> Vernon >> >> >> >> >> _______________________________________________ >> python-win32 mailing list >> python-win32 at python.org >> http://mail.python.org/mailman/listinfo/python-win32 >> > >_______________________________________________ >python-win32 mailing list >python-win32 at python.org >http://mail.python.org/mailman/listinfo/python-win32 -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmanfre at gmail.com Tue Mar 26 14:08:58 2013 From: mmanfre at gmail.com (Michael Manfre) Date: Tue, 26 Mar 2013 09:08:58 -0400 Subject: [python-win32] Dropping support for Python 2.3? In-Reply-To: References: <5151967F.3020006@gmail.com> Message-ID: Anyone running a no longer supported version of Python on Windows has already made the conscious decision that upgrading their code to newer versions is not worth the cost. No point in shifting that cost to pywin32 maintenance. +1 on dropping all code from any version of Python that no longer receives security updates. Regards, Michael Manfre On Tue, Mar 26, 2013 at 8:44 AM, Kris Hardy wrote: > +1 > > Mark Hammond wrote: >> >> I've been happy to drop support for a couple of years, but while it kept >> working I kept building it :) I can't recall if 2.4 is built with vc6 >> >> too - if so, we might as well kill that too. >> >> Cheers, >> >> Mark. >> >> On 26/03/2013 8:33 PM, Vernon D. Cole wrote: >> >>> Perhaps it is time... >>> >>> I found a copy of Python 2.3 to load onto a new computer in order to >>> test my software, but it was not easy. It is in the small print about >>> four pages down from the download page on python.org >>> >>> . I was one of 432 people who have downloaded the >>> 2.3 installer for pywin32 build 218. Compared with 121,351 downloaded >>> installers fo >>> r >>> Python 3.3 and 2.7 combined, 431 is 0.35 percent of our >>> users. I discounted myself, because the only reason I downloaded the >>> package was to make sure I have not broken something by using a new >>> feature. I wonder how many of the others of that 432 are for similar >>> >>> reasons. Most, I would bet. >>> >>> Supporting that zero point three percent is costly, in terms of lost >>> features. Adodbapi is not a large module, but there are half a dozen >>> places in it which deal specifically with Python 2.3 -- such as "import >>> >>> win32com.decimal.decimal_23 as decimal" for example. There are two >>> places which work around not having generator expressions, and a big >>> question in the comments about handling the difference between long and >>> >>> int integers, and whether that is done correctly. There is also a >>> confusing code block for float conversion with commas versus dots. All >>> of that goes away if I simply change the "all versions of CPython lat >>> er >>> than,,," line. >>> >>> The important differences in Python 2.4 >>> * decimal.Decimal >>> * generator expressions >>> * built in set objects >>> * Decorators >>> * unified integers >>> * locale-independent float/string conversion >>> >>> * reverse iteration >>> >>> I am starting an informal poll... >>> >>> Is it really worthwhile to keep maintaining support for Python 2.3, >>> which was released in 2005 and has not been updated since 2008? >>> -- >>> Vernon >>> >>> >>> >>> >>> ------------------------------ >>> >>> python-win32 mailing list >>> python-win32 at python.org >>> http://mail.python.org/mailman/listinfo/python-win32 >>> >> >> >> ------------------------------ >> >> python-win32 mailing list >> python-win32 at python.org >> http://mail.python.org/mailman/listinfo/python-win32 >> >> > -- > Sent from my Android phone with K-9 Mail. Please excuse my brevity. > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > http://mail.python.org/mailman/listinfo/python-win32 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From costishatzopoulos at gmail.com Wed Mar 27 10:51:58 2013 From: costishatzopoulos at gmail.com (Costis Hatzopoulos) Date: Wed, 27 Mar 2013 11:51:58 +0200 Subject: [python-win32] win32com.client.gencache.EnsureModule works but win32com.client.Dispatch does not for a certain TypeLib Message-ID: Hello, I have updated to the latest version of python-win32 on Windows 7 64bit, default CPython 2.7.3 64bit installation. Everything seems to work fine for all other application (Excel and ZwCAD) except a commercial one that I have installed on my system. I do the following: Run makepy.py with the -i argument and I pick EP_XmlProject 1.0 Type Library which shows the following: {470874B8-3526-4DDB-BB88-7A8D7E968E3E}, lcid=0, major=1, minor=0 >>> # Use these commands in Python code to auto generate .py support >>> from win32com.client import gencache >>> gencache.EnsureModule('{470874B8-3526-4DDB-BB88-7A8D7E968E3E}', 0, 1, 0) In PythonWin: >>> import win32com.client as wc >>> mod = wc.gencache.EnsureModule('{470874B8-3526-4DDB-BB88-7A8D7E968E3E}', 0, 1, 0) >>> print mod this means that the module is created. I can verify that the module exists in 'C:\Python27\Lib\site-packages\win32com\gen_py\' the in the PythonWin I do the following: >>> print wc.gencache.GetClassForProgID('EP_XmlProject.EPX_App') win32com.gen_py.470874B8-3526-4DDB-BB88-7A8D7E968E3Ex0x1x0.EPX_App then if I try to do: >>> app = wc.Dispatch('EP_XmlProject.EPX_App') Traceback (most recent call last): File "", line 1, in File "C:\Python27\lib\site-packages\win32com\client\__init__.py", line 95, in Dispatch dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx) File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 114, in _GetGoodDispatchAndUserName return (_GetGoodDispatch(IDispatch, clsctx), userName) File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 91, in _GetGoodDispatch IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch) com_error: (-2147221164, 'Class not registered', None, None) I'm completely stuck!!! To make things worst In my home XP Box, CPython 2.7.3 32bit and pywin32-217 everything works fine! Regards, Costis Hatzopoulos -------------- next part -------------- An HTML attachment was scrubbed... URL: From rupole at hotmail.com Wed Mar 27 17:15:17 2013 From: rupole at hotmail.com (Roger Upole) Date: Wed, 27 Mar 2013 12:15:17 -0400 Subject: [python-win32] win32com.client.gencache.EnsureModule works but win32com.client.Dispatch does not for a certain TypeLib References: Message-ID: You'll need to use 32-bit python to be able to load a 32-bit COM object directly. Roger "Costis Hatzopoulos" wrote in message news:CAMFgko=J+TwSr1QfQqZE4YhRVt5-=r-qtn=-ijf_DDhPcXz8mg at mail.gmail.com... > Hello, > > I have updated to the latest version of python-win32 on Windows 7 64bit, > default CPython 2.7.3 64bit installation. Everything seems to work fine for > all other application (Excel and ZwCAD) except a commercial one that I have > installed on my system. I do the following: > > Run makepy.py with the -i argument and I pick EP_XmlProject 1.0 Type > Library which shows the following: > > {470874B8-3526-4DDB-BB88-7A8D7E968E3E}, lcid=0, major=1, minor=0 > >>> # Use these commands in Python code to auto generate .py support > >>> from win32com.client import gencache > >>> gencache.EnsureModule('{470874B8-3526-4DDB-BB88-7A8D7E968E3E}', 0, 1, > 0) > > In PythonWin: >>>> import win32com.client as wc >>>> mod = > wc.gencache.EnsureModule('{470874B8-3526-4DDB-BB88-7A8D7E968E3E}', 0, 1, 0) >>>> print mod > 'C:\Python27\lib\site-packages\win32com\gen_py\470874B8-3526-4DDB-BB88-7A8D7E968E3Ex0x1x0.py'> > > this means that the module is created. I can verify that the module exists > in 'C:\Python27\Lib\site-packages\win32com\gen_py\' > > the in the PythonWin I do the following: >>>> print wc.gencache.GetClassForProgID('EP_XmlProject.EPX_App') > win32com.gen_py.470874B8-3526-4DDB-BB88-7A8D7E968E3Ex0x1x0.EPX_App > > then if I try to do: >>>> app = wc.Dispatch('EP_XmlProject.EPX_App') > Traceback (most recent call last): > File "", line 1, in > File "C:\Python27\lib\site-packages\win32com\client\__init__.py", line > 95, in Dispatch > dispatch, userName = > dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx) > File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line > 114, in _GetGoodDispatchAndUserName > return (_GetGoodDispatch(IDispatch, clsctx), userName) > File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 91, > in _GetGoodDispatch > IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, > pythoncom.IID_IDispatch) > com_error: (-2147221164, 'Class not registered', None, None) > > I'm completely stuck!!! To make things worst In my home XP Box, CPython > 2.7.3 32bit and pywin32-217 everything works fine! > > Regards, > > Costis Hatzopoulos > -------------------------------------------------------------------------------- > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > http://mail.python.org/mailman/listinfo/python-win32 > From rupole at hotmail.com Wed Mar 27 19:18:35 2013 From: rupole at hotmail.com (Roger Upole) Date: Wed, 27 Mar 2013 14:18:35 -0400 Subject: [python-win32] Dropping support for Python 2.3? References: <5151967F.3020006@gmail.com> Message-ID: Python 2.4 is VS.Net 2003 (aka VC7). If we can drop support for Windows 95/98/ME while we're at it, it would eliminate some more maintenance headaches. At this point in time, even dropping Windows NT isn't unreasonable. Roger "Mark Hammond" wrote in message news:5151967F.3020006 at gmail.com... > I've been happy to drop support for a couple of years, but while it kept working I kept building it :) I can't recall if 2.4 is > built with vc6 too - if so, we might as well kill that too. > > Cheers, > > Mark. > From skippy.hammond at gmail.com Thu Mar 28 00:29:42 2013 From: skippy.hammond at gmail.com (Mark Hammond) Date: Thu, 28 Mar 2013 10:29:42 +1100 Subject: [python-win32] Dropping support for Python 2.3? In-Reply-To: References: <5151967F.3020006@gmail.com> Message-ID: <515380E6.1090905@gmail.com> On 28/03/2013 5:18 AM, Roger Upole wrote: > Python 2.4 is VS.Net 2003 (aka VC7). > > If we can drop support for Windows 95/98/ME while we're > at it, it would eliminate some more maintenance headaches. > At this point in time, even dropping Windows NT isn't unreasonable. Agreed. Mark > > Roger > > "Mark Hammond" wrote in message news:5151967F.3020006 at gmail.com... >> I've been happy to drop support for a couple of years, but while it kept working I kept building it :) I can't recall if 2.4 is >> built with vc6 too - if so, we might as well kill that too. >> >> Cheers, >> >> Mark. >> > > > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > http://mail.python.org/mailman/listinfo/python-win32 > From costishatzopoulos at gmail.com Thu Mar 28 15:01:12 2013 From: costishatzopoulos at gmail.com (Costis Hatzopoulos) Date: Thu, 28 Mar 2013 16:01:12 +0200 Subject: [python-win32] Subject: Re: win32com.client.gencache.EnsureModule works but win32com.client.Dispatch does not for a certain TypeLib Message-ID: Thanks Roger, but I don't think that this is the problem, because from the same configuration i can script Excel 2007 32-bit and ZwCAD 2011 32-bit too! Regards, -------------- next part -------------- An HTML attachment was scrubbed... URL: From timr at probo.com Thu Mar 28 17:47:47 2013 From: timr at probo.com (Tim Roberts) Date: Thu, 28 Mar 2013 09:47:47 -0700 Subject: [python-win32] Subject: Re: win32com.client.gencache.EnsureModule works but win32com.client.Dispatch does not for a certain TypeLib In-Reply-To: References: Message-ID: <51547433.2070303@probo.com> Costis Hatzopoulos wrote: > > but I don't think that this is the problem, because from the same > configuration i can script Excel 2007 32-bit and ZwCAD 2011 32-bit too! Roger is quite correct in saying that you cannot load a 32-bit DLL into a 64-bit process (or vice versa). That is an incontrovertible fact. COM servers come in two styles: "in-process" and "out-of-process". An in-process server loads as a DLL in your process. An out-of-process server runs as a separate application; a stub DLL gets loaded into your process that uses Remote Procedure Call to make requests into the separate application. Excel is an out-of-process COM server. That means it doesn't care about your bittedness. I don't know about ZwCAD, but it might be the same. If the COM server you are trying to access only supports "in-process" serving (and many do), then you cannot use it from 64-bit Python. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From costishatzopoulos at gmail.com Fri Mar 29 14:11:43 2013 From: costishatzopoulos at gmail.com (Costis Hatzopoulos) Date: Fri, 29 Mar 2013 15:11:43 +0200 Subject: [python-win32] win32com.client.gencache.EnsureModule works but win32com.client.Dispatch does not for a certain TypeLib Message-ID: Hello guys, Got it! Thanks for your replies and the excellent work on pywin32! Regards, -------------- next part -------------- An HTML attachment was scrubbed... URL: