From ioannis.michailidis at web.de Sun Mar 17 05:42:23 2024 From: ioannis.michailidis at web.de (Jannis) Date: Sun, 17 Mar 2024 10:42:23 +0100 Subject: [python-win32] __getattr__ Error Message-ID: Hello together, I am trying to automate a point cloud creation out of CATParts in CATIA. The win32com client can access CATIA documents, but NOT methods and attributes in the parts. I get the following error: File "C:\Users\th80im\source\repos\PythonPointCloudCreation\PythonPointCloudCreation\PythonPointCloudCreation\py37_env_1\lib\site-packages\win32com\client\dynamic.py", line 638, in __getattr__ ? ? raise AttributeError("%s.%s" % (self._username_, attr)) AttributeError: .HybridShapes I guess, there is something wrong with the registering of CATIA, or the installation of the client? Or am I looking in the wrong direction? Thank you & Best Regards ioannis From haraldarminmassa at gmail.com Mon Mar 18 07:43:12 2024 From: haraldarminmassa at gmail.com (haraldarminmassa at gmail.com) Date: Mon, 18 Mar 2024 12:43:12 +0100 Subject: [python-win32] __getattr__ Error In-Reply-To: References: Message-ID: Hi Jannis, a good way forward: create less-dynamic COM-bindings by using makepy.py (it is part of your win32com-client installation, but linked here for the dokumentation) https://github.com/SublimeText/Pywin32/blob/master/lib/x32/win32com/client/makepy.py With makepy py you can create a (very very large) python-file, which includes rather static bindings to reachable exposed attributes and methods. You can then grep or strg+f through that file for "HybridShapes" ... maybe it is just spelled differently. Using COM things for > 2 decades, apps run much smoother using the makepy created files than dynamic dispatch cheers Harald On Sun, Mar 17, 2024 at 7:35?PM Jannis via python-win32 < python-win32 at python.org> wrote: > Hello together, > > > I am trying to automate a point cloud creation out of CATParts in CATIA. > The win32com client can access CATIA documents, but NOT methods and > attributes in the parts. I get the following error: > > > File > > "C:\Users\th80im\source\repos\PythonPointCloudCreation\PythonPointCloudCreation\PythonPointCloudCreation\py37_env_1\lib\site-packages\win32com\client\dynamic.py", > line 638, in __getattr__ > raise AttributeError("%s.%s" % (self._username_, attr)) > AttributeError: .HybridShapes > > > I guess, there is something wrong with the registering of CATIA, or the > installation of the client? Or am I looking in the wrong direction? > > > Thank you & Best Regards > > ioannis > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > https://mail.python.org/mailman/listinfo/python-win32 > -- -- Harald Armin Massa Spielberger Stra?e 49 70435 Stuttgart 0173/9409607 -------------- next part -------------- An HTML attachment was scrubbed... URL: From samuel.06 at hotmail.com Mon Mar 18 01:57:11 2024 From: samuel.06 at hotmail.com (Samuel Therrien) Date: Mon, 18 Mar 2024 05:57:11 +0000 Subject: [python-win32] About support for Windows XP and Internet Explorer, and possible leftover code Message-ID: I've been wondering, what's the state, intent, or policy on support for older OSes? I haven't seen it be mentioned (for example on the readme), yet still see a handle of areas of code referencing support for older OSes (XP, Vista, 7, 8.1, CE, ...), but also commits and PRs dropping support for them (at least building with 8.1 SDKs is dropped). I'd assume to be "whatever still has a non-EOL CPython version that can be installed", but maybe not? On a technical level, I'm also wondering if winxpgui and winxptheme actually serve any purpose anymore? * winxpgui seems to be some patched-up win32gui for XP? * I'm not sure what winxptheme is exactly. I'm not able to do much with it. I guess "the Windows XP 'theme' API" is some old Windows stuff that never quite went away in the background. As for Internet Explorer, technically there's a mode in Edge to allow some sites to run pages in "IE mode" (that thing really won't die, will it?), but that's still through the Edge application. The iebutton and ietoolbar demos technically do install an addon that I can see and enable in "Internet Settings", but idk if they can really do anything (and as such, if the demos are still valid). -------------- next part -------------- An HTML attachment was scrubbed... URL: From akbhargava at gmail.com Mon Mar 18 09:12:55 2024 From: akbhargava at gmail.com (Alok Bhargava) Date: Mon, 18 Mar 2024 09:12:55 -0400 Subject: [python-win32] __getattr__ Error In-Reply-To: References: Message-ID: Hi and thank you for your insightful guidance on Jannis' question. I am running into similar issues as I work with a 3rd party COM app. This may be a silly question but could you point me to where the generated class files are located? Many thanks! On Mon, Mar 18, 2024 at 7:43?AM wrote: > Hi Jannis, > > a good way forward: create less-dynamic COM-bindings by using makepy.py > (it is part of your win32com-client installation, but linked here for the > dokumentation) > > > > https://github.com/SublimeText/Pywin32/blob/master/lib/x32/win32com/client/makepy.py > > With makepy py you can create a (very very large) python-file, which > includes rather static bindings to > reachable exposed attributes and methods. > > You can then grep or strg+f through that file for "HybridShapes" ... maybe > it is just spelled differently. > > Using COM things for > 2 decades, apps run much smoother using the makepy > created files than dynamic dispatch > > cheers > > Harald > > > On Sun, Mar 17, 2024 at 7:35?PM Jannis via python-win32 < > python-win32 at python.org> wrote: > >> Hello together, >> >> >> I am trying to automate a point cloud creation out of CATParts in CATIA. >> The win32com client can access CATIA documents, but NOT methods and >> attributes in the parts. I get the following error: >> >> >> File >> >> "C:\Users\th80im\source\repos\PythonPointCloudCreation\PythonPointCloudCreation\PythonPointCloudCreation\py37_env_1\lib\site-packages\win32com\client\dynamic.py", >> line 638, in __getattr__ >> raise AttributeError("%s.%s" % (self._username_, attr)) >> AttributeError: .HybridShapes >> >> >> I guess, there is something wrong with the registering of CATIA, or the >> installation of the client? Or am I looking in the wrong direction? >> >> >> Thank you & Best Regards >> >> ioannis >> >> _______________________________________________ >> python-win32 mailing list >> python-win32 at python.org >> https://mail.python.org/mailman/listinfo/python-win32 >> > > > -- > -- > Harald Armin Massa > Spielberger Stra?e 49 > 70435 Stuttgart > 0173/9409607 > > _______________________________________________ > 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 haraldarminmassa at gmail.com Mon Mar 18 09:36:15 2024 From: haraldarminmassa at gmail.com (haraldarminmassa at gmail.com) Date: Mon, 18 Mar 2024 14:36:15 +0100 Subject: [python-win32] __getattr__ Error In-Reply-To: References: Message-ID: Hi Alok, there should be a __gencache__ directory somewhere, which contains the generated files. But it is WAY easier to just use the -o -- Create output in a specified output file. If the path leading to the file does not exist, any missing directories will be created. NOTE: -o cannot be used with -d. This will generate an error. parameter of makepy.py cheers Harald On Mon, Mar 18, 2024 at 2:13?PM Alok Bhargava wrote: > Hi and thank you for your insightful guidance on Jannis' question. I am > running into similar issues as I work with a 3rd party COM app. > > This may be a silly question but could you point me to where the generated > class files are located? > > Many thanks! > > > On Mon, Mar 18, 2024 at 7:43?AM wrote: > >> Hi Jannis, >> >> a good way forward: create less-dynamic COM-bindings by using makepy.py >> (it is part of your win32com-client installation, but linked here for the >> dokumentation) >> >> >> >> https://github.com/SublimeText/Pywin32/blob/master/lib/x32/win32com/client/makepy.py >> >> With makepy py you can create a (very very large) python-file, which >> includes rather static bindings to >> reachable exposed attributes and methods. >> >> You can then grep or strg+f through that file for "HybridShapes" ... >> maybe it is just spelled differently. >> >> Using COM things for > 2 decades, apps run much smoother using the makepy >> created files than dynamic dispatch >> >> cheers >> >> Harald >> >> >> On Sun, Mar 17, 2024 at 7:35?PM Jannis via python-win32 < >> python-win32 at python.org> wrote: >> >>> Hello together, >>> >>> >>> I am trying to automate a point cloud creation out of CATParts in CATIA. >>> The win32com client can access CATIA documents, but NOT methods and >>> attributes in the parts. I get the following error: >>> >>> >>> File >>> >>> "C:\Users\th80im\source\repos\PythonPointCloudCreation\PythonPointCloudCreation\PythonPointCloudCreation\py37_env_1\lib\site-packages\win32com\client\dynamic.py", >>> line 638, in __getattr__ >>> raise AttributeError("%s.%s" % (self._username_, attr)) >>> AttributeError: .HybridShapes >>> >>> >>> I guess, there is something wrong with the registering of CATIA, or the >>> installation of the client? Or am I looking in the wrong direction? >>> >>> >>> Thank you & Best Regards >>> >>> ioannis >>> >>> _______________________________________________ >>> python-win32 mailing list >>> python-win32 at python.org >>> https://mail.python.org/mailman/listinfo/python-win32 >>> >> >> >> -- >> -- >> Harald Armin Massa >> Spielberger Stra?e 49 >> 70435 Stuttgart >> 0173/9409607 >> >> _______________________________________________ >> python-win32 mailing list >> python-win32 at python.org >> https://mail.python.org/mailman/listinfo/python-win32 >> > -- -- Harald Armin Massa Spielberger Stra?e 49 70435 Stuttgart 0173/9409607 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mhammond at skippinet.com.au Mon Mar 18 10:07:07 2024 From: mhammond at skippinet.com.au (Mark Hammond) Date: Mon, 18 Mar 2024 10:07:07 -0400 Subject: [python-win32] __getattr__ Error In-Reply-To: References: Message-ID: <6a6fc634-c4ab-47a6-88a7-e3e736bd13f1@skippinet.com.au> On 2024-03-18 9:12 a.m., Alok Bhargava wrote: > Hi and thank you for your insightful guidance on Jannis' question.? I > am running into similar issues as I work with a 3rd party COM app. > > This may be a silly question but could you point me to where the > generated class files are located? I think makepy will print the path name as it generates the file, but `import win32com; print(win32com.__gen_path__)` will print the location. Cheers, Mark > > Many thanks! > > > On Mon, Mar 18, 2024 at 7:43?AM wrote: > > Hi Jannis, > > a good way forward: create less-dynamic COM-bindings by using > makepy.py > (it is part of your win32com-client installation, but linked here > for the dokumentation) > > > https://github.com/SublimeText/Pywin32/blob/master/lib/x32/win32com/client/makepy.py > > With makepy py you can create a (very very large) python-file, > which includes rather static bindings?to > reachable exposed attributes and methods. > > You can then grep or strg+f through that file for "HybridShapes" > ... maybe it is just spelled differently. > > Using COM things for > 2 decades, apps run much smoother using the > makepy created files than dynamic dispatch > > cheers > > Harald > > > On Sun, Mar 17, 2024 at 7:35?PM Jannis via python-win32 > wrote: > > Hello together, > > > I am trying to automate a point cloud creation out of CATParts > in CATIA. > The win32com client can access CATIA documents, but NOT > methods and > attributes in the parts. I get the following error: > > > File > "C:\Users\th80im\source\repos\PythonPointCloudCreation\PythonPointCloudCreation\PythonPointCloudCreation\py37_env_1\lib\site-packages\win32com\client\dynamic.py", > line 638, in __getattr__ > ?? ? raise AttributeError("%s.%s" % (self._username_, attr)) > AttributeError: .HybridShapes > > > I guess, there is something wrong with the registering of > CATIA, or the > installation of the client? Or am I looking in the wrong > direction? > > > Thank you & Best Regards > > ioannis > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > https://mail.python.org/mailman/listinfo/python-win32 > > > > -- > -- > Harald Armin Massa > Spielberger Stra?e 49 > 70435 Stuttgart > 0173/9409607 > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > https://mail.python.org/mailman/listinfo/python-win32 > > > _______________________________________________ > 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 mhammond at skippinet.com.au Mon Mar 18 10:13:40 2024 From: mhammond at skippinet.com.au (Mark Hammond) Date: Mon, 18 Mar 2024 10:13:40 -0400 Subject: [python-win32] About support for Windows XP and Internet Explorer, and possible leftover code In-Reply-To: References: Message-ID: <2ac5d489-9c75-4a73-ad6e-1ab36921aef9@skippinet.com.au> On 2024-03-18 1:57 a.m., Samuel Therrien wrote: > I've been wondering, what's the state, intent, or policy on support > for older OSes? I haven't seen it be mentioned (for example on the > readme), yet still see a handle of areas of code referencing support > for older OSes (XP, Vista, 7, 8.1, CE, ...), but also commits and PRs > dropping support for them (at least building with 8.1 SDKs is dropped). > > I'd assume to be "whatever still has a non-EOL CPython version that > can be installed", but maybe not? Yep, that's correct. As you note, dropping support for building using older SDKs is dropped more aggressively, but that generally doesn't prevent things running on those older OSs. > > On a technical level, I'm also wondering if winxpgui and winxptheme > actually serve any purpose anymore? > > * > winxpgui seems to be some patched-up win32gui for XP? > * > I'm not sure what winxptheme is exactly. I'm not able to do much > with it. I guess "the Windows XP 'theme' API" is some old Windows > stuff that never quite went away in the background. > These were split to support older OS versions back in the day, but there's no longer a need given we no longer support XP at all. However, for backwards compatibility we can't really drop the names - IOW, these could all technically be rolled into a single .pyd, but `from winxpgui import foo` must continue to work somehow for all `foo` it worked for in the past. > > As for Internet Explorer, technically there's a mode in Edge to allow > some sites to run pages in "IE mode" (that thing really won't die, > will it?), but that's still through the Edge application. > The iebutton and ietoolbar demos technically do install an addon that > I can see and enable in "Internet Settings", but idk if they can > really do anything (and as such, if the demos are still valid). In that case I see no reason to not consider them valid. Cheers, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From akbhargava at gmail.com Mon Mar 18 10:25:24 2024 From: akbhargava at gmail.com (Alok Bhargava) Date: Mon, 18 Mar 2024 10:25:24 -0400 Subject: [python-win32] __getattr__ Error In-Reply-To: References: Message-ID: Many thanks Harald! If I specify the file location when running makepy, how do I ensure myapplication knows where to find them? Again this may be a silly question, so please bear with me. Thank you! On Mon, Mar 18, 2024 at 9:36?AM wrote: > Hi Alok, > > there should be a __gencache__ directory somewhere, which contains the > generated files. > But it is WAY easier to just use the > > -o -- Create output in a specified output file. If the path leading > to the file does not exist, any missing directories will be > created. > NOTE: -o cannot be used with -d. This will generate an error. > > parameter of makepy.py > > cheers > > Harald > > On Mon, Mar 18, 2024 at 2:13?PM Alok Bhargava > wrote: > >> Hi and thank you for your insightful guidance on Jannis' question. I am >> running into similar issues as I work with a 3rd party COM app. >> >> This may be a silly question but could you point me to where the >> generated class files are located? >> >> Many thanks! >> >> >> On Mon, Mar 18, 2024 at 7:43?AM wrote: >> >>> Hi Jannis, >>> >>> a good way forward: create less-dynamic COM-bindings by using makepy.py >>> (it is part of your win32com-client installation, but linked here for >>> the dokumentation) >>> >>> >>> >>> https://github.com/SublimeText/Pywin32/blob/master/lib/x32/win32com/client/makepy.py >>> >>> With makepy py you can create a (very very large) python-file, which >>> includes rather static bindings to >>> reachable exposed attributes and methods. >>> >>> You can then grep or strg+f through that file for "HybridShapes" ... >>> maybe it is just spelled differently. >>> >>> Using COM things for > 2 decades, apps run much smoother using the >>> makepy created files than dynamic dispatch >>> >>> cheers >>> >>> Harald >>> >>> >>> On Sun, Mar 17, 2024 at 7:35?PM Jannis via python-win32 < >>> python-win32 at python.org> wrote: >>> >>>> Hello together, >>>> >>>> >>>> I am trying to automate a point cloud creation out of CATParts in CATIA. >>>> The win32com client can access CATIA documents, but NOT methods and >>>> attributes in the parts. I get the following error: >>>> >>>> >>>> File >>>> >>>> "C:\Users\th80im\source\repos\PythonPointCloudCreation\PythonPointCloudCreation\PythonPointCloudCreation\py37_env_1\lib\site-packages\win32com\client\dynamic.py", >>>> line 638, in __getattr__ >>>> raise AttributeError("%s.%s" % (self._username_, attr)) >>>> AttributeError: .HybridShapes >>>> >>>> >>>> I guess, there is something wrong with the registering of CATIA, or the >>>> installation of the client? Or am I looking in the wrong direction? >>>> >>>> >>>> Thank you & Best Regards >>>> >>>> ioannis >>>> >>>> _______________________________________________ >>>> python-win32 mailing list >>>> python-win32 at python.org >>>> https://mail.python.org/mailman/listinfo/python-win32 >>>> >>> >>> >>> -- >>> -- >>> Harald Armin Massa >>> Spielberger Stra?e 49 >>> 70435 Stuttgart >>> 0173/9409607 >>> >>> _______________________________________________ >>> python-win32 mailing list >>> python-win32 at python.org >>> https://mail.python.org/mailman/listinfo/python-win32 >>> >> > > -- > -- > Harald Armin Massa > Spielberger Stra?e 49 > 70435 Stuttgart > 0173/9409607 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From skippy.hammond at gmail.com Mon Mar 18 10:29:17 2024 From: skippy.hammond at gmail.com (Mark Hammond) Date: Mon, 18 Mar 2024 10:29:17 -0400 Subject: [python-win32] __getattr__ Error In-Reply-To: References: Message-ID: <54a98ac0-7d4c-457f-a561-9f25e18c76b6@gmail.com> In general, if you `from win32com.client.gencache import EnsureDispatch`, you should be able to use `EnsureDispatch` anywhere you previously used plain `Dispatch`, and that code should be automatically generated and used for you. You generally only need to specify a special location or run makepy manually if there's something odd about the object which makes the above not work. Mark On 2024-03-18 10:25 a.m., Alok Bhargava wrote: > Many thanks Harald! > > If I specify the file location when running makepy, how do I ensure > myapplication knows where to find them?? Again this may be a silly > question, so please bear with me. > > Thank you! > > On Mon, Mar 18, 2024 at 9:36?AM wrote: > > Hi Alok, > > there should be a __gencache__ directory somewhere, which contains > the generated files. > But it is WAY easier to just use the > > ? -o ? ?-- Create output in a specified output file. If the path > leading > ? ? ? ? ? ?to the file does not exist, any missing directories will be > ? ? ? ? ? ?created. > ? ? ? ? ? ?NOTE: -o cannot be used with -d.? This will generate an > error. > > parameter of makepy.py > > cheers > > Harald > > On Mon, Mar 18, 2024 at 2:13?PM Alok Bhargava > wrote: > > Hi and thank you for your insightful guidance on Jannis' > question.? I am running into similar issues as I work with a > 3rd party COM app. > > This may be a silly question but could you point me to where > the generated class files are located? > > Many thanks! > > > On Mon, Mar 18, 2024 at 7:43?AM > wrote: > > Hi Jannis, > > a good way forward: create less-dynamic COM-bindings by > using makepy.py > (it is part of your win32com-client installation, but > linked here for the dokumentation) > > > https://github.com/SublimeText/Pywin32/blob/master/lib/x32/win32com/client/makepy.py > > With makepy py you can create a (very very large) > python-file, which includes rather static bindings?to > reachable exposed attributes and methods. > > You can then grep or strg+f through that file for > "HybridShapes" ... maybe it is just spelled differently. > > Using COM things for > 2 decades, apps run much smoother > using the makepy created files than dynamic dispatch > > cheers > > Harald > > > On Sun, Mar 17, 2024 at 7:35?PM Jannis via python-win32 > wrote: > > Hello together, > > > I am trying to automate a point cloud creation out of > CATParts in CATIA. > The win32com client can access CATIA documents, but > NOT methods and > attributes in the parts. I get the following error: > > > File > "C:\Users\th80im\source\repos\PythonPointCloudCreation\PythonPointCloudCreation\PythonPointCloudCreation\py37_env_1\lib\site-packages\win32com\client\dynamic.py", > line 638, in __getattr__ > ?? ? raise AttributeError("%s.%s" % (self._username_, > attr)) > AttributeError: .HybridShapes > > > I guess, there is something wrong with the registering > of CATIA, or the > installation of the client? Or am I looking in the > wrong direction? > > > Thank you & Best Regards > > ioannis > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > https://mail.python.org/mailman/listinfo/python-win32 > > > > -- > -- > Harald Armin Massa > Spielberger Stra?e 49 > 70435 Stuttgart > 0173/9409607 > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > https://mail.python.org/mailman/listinfo/python-win32 > > > > -- > -- > Harald Armin Massa > Spielberger Stra?e 49 > 70435 Stuttgart > 0173/9409607 > > > _______________________________________________ > 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 akbhargava at gmail.com Mon Mar 18 10:26:15 2024 From: akbhargava at gmail.com (Alok Bhargava) Date: Mon, 18 Mar 2024 10:26:15 -0400 Subject: [python-win32] __getattr__ Error In-Reply-To: References: Message-ID: Many thanks Mark - it is great to be able to learn more about the system from its creators! On Mon, Mar 18, 2024 at 10:25?AM Alok Bhargava wrote: > Many thanks Harald! > > If I specify the file location when running makepy, how do I ensure > myapplication knows where to find them? Again this may be a silly > question, so please bear with me. > > Thank you! > > On Mon, Mar 18, 2024 at 9:36?AM wrote: > >> Hi Alok, >> >> there should be a __gencache__ directory somewhere, which contains the >> generated files. >> But it is WAY easier to just use the >> >> -o -- Create output in a specified output file. If the path leading >> to the file does not exist, any missing directories will be >> created. >> NOTE: -o cannot be used with -d. This will generate an error. >> >> parameter of makepy.py >> >> cheers >> >> Harald >> >> On Mon, Mar 18, 2024 at 2:13?PM Alok Bhargava >> wrote: >> >>> Hi and thank you for your insightful guidance on Jannis' question. I am >>> running into similar issues as I work with a 3rd party COM app. >>> >>> This may be a silly question but could you point me to where the >>> generated class files are located? >>> >>> Many thanks! >>> >>> >>> On Mon, Mar 18, 2024 at 7:43?AM wrote: >>> >>>> Hi Jannis, >>>> >>>> a good way forward: create less-dynamic COM-bindings by using makepy.py >>>> (it is part of your win32com-client installation, but linked here for >>>> the dokumentation) >>>> >>>> >>>> >>>> https://github.com/SublimeText/Pywin32/blob/master/lib/x32/win32com/client/makepy.py >>>> >>>> With makepy py you can create a (very very large) python-file, which >>>> includes rather static bindings to >>>> reachable exposed attributes and methods. >>>> >>>> You can then grep or strg+f through that file for "HybridShapes" ... >>>> maybe it is just spelled differently. >>>> >>>> Using COM things for > 2 decades, apps run much smoother using the >>>> makepy created files than dynamic dispatch >>>> >>>> cheers >>>> >>>> Harald >>>> >>>> >>>> On Sun, Mar 17, 2024 at 7:35?PM Jannis via python-win32 < >>>> python-win32 at python.org> wrote: >>>> >>>>> Hello together, >>>>> >>>>> >>>>> I am trying to automate a point cloud creation out of CATParts in >>>>> CATIA. >>>>> The win32com client can access CATIA documents, but NOT methods and >>>>> attributes in the parts. I get the following error: >>>>> >>>>> >>>>> File >>>>> >>>>> "C:\Users\th80im\source\repos\PythonPointCloudCreation\PythonPointCloudCreation\PythonPointCloudCreation\py37_env_1\lib\site-packages\win32com\client\dynamic.py", >>>>> line 638, in __getattr__ >>>>> raise AttributeError("%s.%s" % (self._username_, attr)) >>>>> AttributeError: .HybridShapes >>>>> >>>>> >>>>> I guess, there is something wrong with the registering of CATIA, or the >>>>> installation of the client? Or am I looking in the wrong direction? >>>>> >>>>> >>>>> Thank you & Best Regards >>>>> >>>>> ioannis >>>>> >>>>> _______________________________________________ >>>>> python-win32 mailing list >>>>> python-win32 at python.org >>>>> https://mail.python.org/mailman/listinfo/python-win32 >>>>> >>>> >>>> >>>> -- >>>> -- >>>> Harald Armin Massa >>>> Spielberger Stra?e 49 >>>> 70435 Stuttgart >>>> 0173/9409607 >>>> >>>> _______________________________________________ >>>> python-win32 mailing list >>>> python-win32 at python.org >>>> https://mail.python.org/mailman/listinfo/python-win32 >>>> >>> >> >> -- >> -- >> Harald Armin Massa >> Spielberger Stra?e 49 >> 70435 Stuttgart >> 0173/9409607 >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From haraldarminmassa at gmail.com Mon Mar 18 10:42:55 2024 From: haraldarminmassa at gmail.com (haraldarminmassa at gmail.com) Date: Mon, 18 Mar 2024 15:42:55 +0100 Subject: [python-win32] __getattr__ Error In-Reply-To: References: Message-ID: My usage is: I have to bundle all the pys in one exe file. And do not want that exe-file to write into it's directory. So I do: makepy -o OLE_Excel16.py and within my program: import OLE_Excel16 as Excel olx = Excel.Application() On Mon, Mar 18, 2024 at 3:25?PM Alok Bhargava wrote: > Many thanks Harald! > > If I specify the file location when running makepy, how do I ensure > myapplication knows where to find them? Again this may be a silly > question, so please bear with me. > > Thank you! > > On Mon, Mar 18, 2024 at 9:36?AM wrote: > >> Hi Alok, >> >> there should be a __gencache__ directory somewhere, which contains the >> generated files. >> But it is WAY easier to just use the >> >> -o -- Create output in a specified output file. If the path leading >> to the file does not exist, any missing directories will be >> created. >> NOTE: -o cannot be used with -d. This will generate an error. >> >> parameter of makepy.py >> >> cheers >> >> Harald >> >> On Mon, Mar 18, 2024 at 2:13?PM Alok Bhargava >> wrote: >> >>> Hi and thank you for your insightful guidance on Jannis' question. I am >>> running into similar issues as I work with a 3rd party COM app. >>> >>> This may be a silly question but could you point me to where the >>> generated class files are located? >>> >>> Many thanks! >>> >>> >>> On Mon, Mar 18, 2024 at 7:43?AM wrote: >>> >>>> Hi Jannis, >>>> >>>> a good way forward: create less-dynamic COM-bindings by using makepy.py >>>> (it is part of your win32com-client installation, but linked here for >>>> the dokumentation) >>>> >>>> >>>> >>>> https://github.com/SublimeText/Pywin32/blob/master/lib/x32/win32com/client/makepy.py >>>> >>>> With makepy py you can create a (very very large) python-file, which >>>> includes rather static bindings to >>>> reachable exposed attributes and methods. >>>> >>>> You can then grep or strg+f through that file for "HybridShapes" ... >>>> maybe it is just spelled differently. >>>> >>>> Using COM things for > 2 decades, apps run much smoother using the >>>> makepy created files than dynamic dispatch >>>> >>>> cheers >>>> >>>> Harald >>>> >>>> >>>> On Sun, Mar 17, 2024 at 7:35?PM Jannis via python-win32 < >>>> python-win32 at python.org> wrote: >>>> >>>>> Hello together, >>>>> >>>>> >>>>> I am trying to automate a point cloud creation out of CATParts in >>>>> CATIA. >>>>> The win32com client can access CATIA documents, but NOT methods and >>>>> attributes in the parts. I get the following error: >>>>> >>>>> >>>>> File >>>>> >>>>> "C:\Users\th80im\source\repos\PythonPointCloudCreation\PythonPointCloudCreation\PythonPointCloudCreation\py37_env_1\lib\site-packages\win32com\client\dynamic.py", >>>>> line 638, in __getattr__ >>>>> raise AttributeError("%s.%s" % (self._username_, attr)) >>>>> AttributeError: .HybridShapes >>>>> >>>>> >>>>> I guess, there is something wrong with the registering of CATIA, or the >>>>> installation of the client? Or am I looking in the wrong direction? >>>>> >>>>> >>>>> Thank you & Best Regards >>>>> >>>>> ioannis >>>>> >>>>> _______________________________________________ >>>>> python-win32 mailing list >>>>> python-win32 at python.org >>>>> https://mail.python.org/mailman/listinfo/python-win32 >>>>> >>>> >>>> >>>> -- >>>> -- >>>> Harald Armin Massa >>>> Spielberger Stra?e 49 >>>> 70435 Stuttgart >>>> 0173/9409607 >>>> >>>> _______________________________________________ >>>> python-win32 mailing list >>>> python-win32 at python.org >>>> https://mail.python.org/mailman/listinfo/python-win32 >>>> >>> >> >> -- >> -- >> Harald Armin Massa >> Spielberger Stra?e 49 >> 70435 Stuttgart >> 0173/9409607 >> >> -- -- Harald Armin Massa Spielberger Stra?e 49 70435 Stuttgart 0173/9409607 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ioannis.michailidis at web.de Wed Mar 20 12:19:32 2024 From: ioannis.michailidis at web.de (Jannis) Date: Wed, 20 Mar 2024 17:19:32 +0100 Subject: [python-win32] __getattr__ Error In-Reply-To: References: Message-ID: <055a18b1-e3e3-4608-b09a-3dee361581e3@web.de> Hello Harald, Thanks for your prompt answer. makepy.py is in the environment, BUT does not run -> pythoncom is missing VS Code has the following suggestions Is there an obvious one to run? The first two don't work.. Best Regards ioannis Am 18.03.2024 um 12:43 schrieb haraldarminmassa at gmail.com: > Hi Jannis, > > a good way forward: create less-dynamic COM-bindings by using makepy.py > (it is part of your win32com-client installation, but linked here for > the dokumentation) > > > https://github.com/SublimeText/Pywin32/blob/master/lib/x32/win32com/client/makepy.py > > With makepy py you can create a (very very large) python-file, which > includes rather static bindings?to > reachable exposed attributes and methods. > > You can then grep or strg+f through that file for "HybridShapes" ... > maybe it is just spelled differently. > > Using COM things for > 2 decades, apps run much smoother using the > makepy created files than dynamic dispatch > > cheers > > Harald > > > On Sun, Mar 17, 2024 at 7:35?PM Jannis via python-win32 > wrote: > > Hello together, > > > I am trying to automate a point cloud creation out of CATParts in > CATIA. > The win32com client can access CATIA documents, but NOT methods and > attributes in the parts. I get the following error: > > > File > "C:\Users\th80im\source\repos\PythonPointCloudCreation\PythonPointCloudCreation\PythonPointCloudCreation\py37_env_1\lib\site-packages\win32com\client\dynamic.py", > line 638, in __getattr__ > ?? ? raise AttributeError("%s.%s" % (self._username_, attr)) > AttributeError: .HybridShapes > > > I guess, there is something wrong with the registering of CATIA, > or the > installation of the client? Or am I looking in the wrong direction? > > > Thank you & Best Regards > > ioannis > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > https://mail.python.org/mailman/listinfo/python-win32 > > > > -- > -- > Harald Armin Massa > Spielberger Stra?e 49 > 70435 Stuttgart > 0173/9409607 > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 580P2VE8hk4Bvw7q.png Type: image/png Size: 117202 bytes Desc: not available URL: