From haslam555 at gmail.com Fri May 15 22:32:04 2020 From: haslam555 at gmail.com (Habibullah Aslam) Date: Fri, 15 May 2020 22:32:04 -0400 Subject: [python-win32] Create simple COM server without admin permissions? Message-ID: Hi, I'm new to pythoncom and I'm just trying to create a basic COM server in Python3 that I can ping from a client. I've been able to create a COM server successfully using the info at http://timgolden.me.uk/pywin32-docs/html/com/win32com/HTML/QuickStartServerCom.html#Registering, but this requires Admin permissions which I don't have access to on my work computer. I was hoping someone could clarify what I need to modify so that I can register the server without raising admin permissions? (I'm aware that it is possible to write to the HKCU registry without admin permissions, though I'm not sure how that would fit in with the basic server code.) Here's my basic server: import pythoncom import win32com from win32com.server.util import wrap _reg_clsid_ = "{6B39CAA1-A320-4CB0-8DB4-352AA81E460E}" class ActiveObject: _public_methods_ = ["ping"] def ping(self): return "1" if __name__ == "__main__": ob = win32com.server.util.wrap(ActiveObject) handle = pythoncom.RegisterActiveObject(ob, _reg_clsid_, 0) print(handle) And here's the client: import win32com.client server = win32com.client.Dispatch("{6B39CAA1-A320-4CB0-8DB4-352AA81E460E}") print(server.ping()) Let me know if you need any additional information. (As an aside, I'm also fine with using AutoHotkey to help register the server in the registry if that's needed.) I've posted a question on StackOverflow if it helps: https://stackoverflow.com/questions/61811297/how-to-create-a-python-com-server-without-admin-permissions Thank you for any input -------------- next part -------------- An HTML attachment was scrubbed... URL: From sensfan24 at hotmail.com Sat May 16 18:32:22 2020 From: sensfan24 at hotmail.com (Haleigh Japp) Date: Sat, 16 May 2020 22:32:22 +0000 Subject: [python-win32] ModuleNotFoundError: no module called encodings Message-ID: Hello, I have Python 3.7.5 and it has worked fine for me until recently. Every time I try to run it I get this fatal Python error saying it can?t find the encodings module. I have uninstalled and re-installed it multiple times, but the same error keeps happening. I searched this issue on Google and couldn?t find a solution. I e-mailed Python Help and was able to get some things working by taking the Python 3.7.5 path off the PYTHONHOME variable. Unfortunately that method only works to an extent, and there are some packages I?m trying to install where it only works with Python running normally. But when it?s on the path, it doesn?t work at all. I?m completely stumped here and any help to fix this issue would be greatly appreciated! -------------- next part -------------- An HTML attachment was scrubbed... URL: From Gary.Scorby at finastra.com Thu May 21 16:09:22 2020 From: Gary.Scorby at finastra.com (Scorby, Gary) Date: Thu, 21 May 2020 20:09:22 +0000 Subject: [python-win32] Python 3.9 and win32ui.pyd Message-ID: I have a few extra hours this week so I installed the first beta of Python 3.9 and added pywin32. Trying to get an early look to see if we are going to make any major changes for the 3.9 release. Running on Windows 10. Followed these steps: Downloaded and installed the Python 3.9 beta. pip pywin32 Ran the pywin32 post install script. Added the path. These are the same steps as when I do a fresh 3.8 install. First thing I tried is starting pythonwin.exe, get this [cid:image003.jpg at 01D62F71.0B134330] I've seen that in the past if I don't do the post install. I tried starting up python.exe and importing win32ui. Get this Traceback (most recent call last): File "", line 1, in ImportError: DLL load failed while importing win32ui: A dynamic link library (DLL) initialization routine failed. I used Process Monitor to watch what is happening and there no problem finding and accessing win32ui.pyd. Guessing something it needs isn't there, but I can identify what. I've tried this on three different Win 10 machines with the same result. Has anyone else run into this? Thank you in advance. Gary "FINASTRA" is the trade name of the FINASTRA group of companies. This email and any attachments have been scanned for known viruses using multiple scanners. This email message is intended for the named recipient only. It may be privileged and/or confidential. If you are not the named recipient of this email please notify us immediately and do not copy it or use it for any purpose, nor disclose its contents to any other person. This email does not constitute the commencement of legal relations between you and FINASTRA. Please refer to the executed contract between you and the relevant member of the FINASTRA group for the identity of the contracting party with which you are dealing. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.jpg Type: image/jpeg Size: 6928 bytes Desc: image003.jpg URL: From timr at probo.com Fri May 22 01:21:00 2020 From: timr at probo.com (Tim Roberts) Date: Thu, 21 May 2020 22:21:00 -0700 Subject: [python-win32] Python 3.9 and win32ui.pyd In-Reply-To: References: Message-ID: On May 21, 2020, at 1:09 PM, Scorby, Gary wrote: > > I have a few extra hours this week so I installed the first beta of Python 3.9 and added pywin32. Trying to get an early look to see if we are going to make any major changes for the 3.9 release. Running on Windows 10. > > Followed these steps: > > Downloaded and installed the Python 3.9 beta. > pip pywin32 > Ran the pywin32 post install script. > Added the path. > > These are the same steps as when I do a fresh 3.8 install. First thing I tried is starting pythonwin.exe, get this It?s possible (although I am just speculating wildly here) that Python 3.9 is being built with a newer version of Visual Studio. Remember that add-ins have to be compiled with the same version as the interpreter, to avoid runtime library conflicts. ? Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From markuskramerigitt at gmail.com Sat May 23 07:27:52 2020 From: markuskramerigitt at gmail.com (Markus Kramer) Date: Sat, 23 May 2020 13:27:52 +0200 Subject: [python-win32] How to install pywin32 for Text only/TTY, excluding all GUI components In-Reply-To: References: Message-ID: Hello, I would like to discuss and contribute to an alternative pip package without GUI: - pip install pywin32 continues as is, e.g. includes Pythonwin. - pip install pywin32nogui would contain no GUI components, e.g. MFC.dll. What are your thoughts? As far as I can see, this would require changes in setup.py. I am aware that dropping Python2 support will also change setup.py. Best regards, Markus Thank you for merging https://github.com/mhammond/pywin32/pull/1490 On Thu, Mar 19, 2020 at 12:29 AM Markus Kramer wrote: > Hello, > SaltStack is a text based, non-GUI Python application that uses pywin32. > The GUI related parts of pywin32 are of no use, but increase the size. > > Can one install/compile pywin32 so, that only the test-based components > are installed? > > I cannot find back an old discussion regarding this question. > > Thank you, > Markus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From martintrujillor at gmail.com Sat May 23 13:16:45 2020 From: martintrujillor at gmail.com (=?UTF-8?Q?Mart=C3=ADn_Trujillo_Raddatz?=) Date: Sat, 23 May 2020 13:16:45 -0400 Subject: [python-win32] help about embed PDF in MS Word Message-ID: HI! im new at programming in python, but very old in programming in general....... i have a request to extract 1 or more embed pdf files in a huge amount of ms word files. i have tried in many ways, but it seems than pywin32 is the easy one, but I can't get the entire solution can any one help me with clues or hints in how to do it? Thank you in advance. *----------------------------------------* *Mart?n Trujillo Raddatz Puerto Montt - Chile Tel?fono: +59 9 96427814 * *----------------------------------------* -------------- next part -------------- An HTML attachment was scrubbed... URL: From timr at probo.com Sun May 24 02:28:10 2020 From: timr at probo.com (Tim Roberts) Date: Sat, 23 May 2020 23:28:10 -0700 Subject: [python-win32] How to install pywin32 for Text only/TTY, excluding all GUI components In-Reply-To: References: Message-ID: On May 23, 2020, at 4:27 AM, Markus Kramer wrote: > > Hello, > I would like to discuss and contribute to an alternative pip package without GUI: > - pip install pywin32 continues as is, e.g. includes Pythonwin. > - pip install pywin32nogui would contain no GUI components, e.g. MFC.dll. > What are your thoughts? What is the point? Installing a package does not mean you are required to use all of it. If you ship a package that doesn?t need the UI components, then your package will not include the components. ? Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From markuskramerigitt at gmail.com Sun May 24 11:57:03 2020 From: markuskramerigitt at gmail.com (Markus Kramer) Date: Sun, 24 May 2020 17:57:03 +0200 Subject: [python-win32] How to install pywin32 for Text only/TTY, excluding all GUI components In-Reply-To: References: Message-ID: Greetings, I opened pull request 1530 with a proposal Best Regards, Markus On Sat, May 23, 2020 at 1:27 PM Markus Kramer wrote: > Hello, > I would like to discuss and contribute to an alternative pip package > without GUI: > - pip install pywin32 continues as is, e.g. includes Pythonwin. > - pip install pywin32nogui would contain no GUI components, e.g. MFC.dll. > What are your thoughts? > > As far as I can see, this would require changes in setup.py. > I am aware that dropping Python2 support will also change setup.py. > > Best regards, > Markus > Thank you for merging https://github.com/mhammond/pywin32/pull/1490 > > > On Thu, Mar 19, 2020 at 12:29 AM Markus Kramer < > markuskramerigitt at gmail.com> wrote: > >> Hello, >> SaltStack is a text based, non-GUI Python application that uses pywin32. >> The GUI related parts of pywin32 are of no use, but increase the size. >> >> Can one install/compile pywin32 so, that only the test-based components >> are installed? >> >> I cannot find back an old discussion regarding this question. >> >> Thank you, >> Markus >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From markuskramerigitt at gmail.com Sun May 24 12:21:13 2020 From: markuskramerigitt at gmail.com (Markus Kramer) Date: Sun, 24 May 2020 18:21:13 +0200 Subject: [python-win32] python-win32 Digest, Vol 205, Issue 5 In-Reply-To: References: Message-ID: Hello Tim, thank you for asking > What is the point? Installing a package does not mean you are required to use all of it. The points are: - Reduce vulnerability. The MFC library is large and (earlier? versions) contained CVE's. - Reduce maintenance cost. By shipping less, you need to observe less, and patch less. - Reduce resources. Less size mean less disk space and less network bandwidth. Then you wrote > If you ship a package that doesn?t need the UI components, then your package will not include the components. This is my goal. I don't get what you refer to with "package". Currently, `pip install pywin32` will include the UI components, even if they are not needed. Best regards, Markus On Sun, May 24, 2020 at 6: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: How to install pywin32 for Text only/TTY, excluding all > GUI components (Markus Kramer) > 2. help about embed PDF in MS Word (Mart?n Trujillo Raddatz) > 3. Re: How to install pywin32 for Text only/TTY, excluding all > GUI components (Tim Roberts) > > > > ---------- Forwarded message ---------- > From: Markus Kramer > To: python-win32 at python.org > Cc: > Bcc: > Date: Sat, 23 May 2020 13:27:52 +0200 > Subject: Re: [python-win32] How to install pywin32 for Text only/TTY, > excluding all GUI components > Hello, > I would like to discuss and contribute to an alternative pip package > without GUI: > - pip install pywin32 continues as is, e.g. includes Pythonwin. > - pip install pywin32nogui would contain no GUI components, e.g. MFC.dll. > What are your thoughts? > > As far as I can see, this would require changes in setup.py. > I am aware that dropping Python2 support will also change setup.py. > > Best regards, > Markus > Thank you for merging https://github.com/mhammond/pywin32/pull/1490 > > > On Thu, Mar 19, 2020 at 12:29 AM Markus Kramer < > markuskramerigitt at gmail.com> wrote: > >> Hello, >> SaltStack is a text based, non-GUI Python application that uses pywin32. >> The GUI related parts of pywin32 are of no use, but increase the size. >> >> Can one install/compile pywin32 so, that only the test-based components >> are installed? >> >> I cannot find back an old discussion regarding this question. >> >> Thank you, >> Markus >> > > > > ---------- Forwarded message ---------- > From: "Mart?n Trujillo Raddatz" > To: python-win32 at python.org > Cc: > Bcc: > Date: Sat, 23 May 2020 13:16:45 -0400 > Subject: [python-win32] help about embed PDF in MS Word > HI! im new at programming in python, but very old in programming in > general....... > i have a request to extract 1 or more embed pdf files in a huge amount of > ms word files. > > i have tried in many ways, but it seems than pywin32 is the easy one, but > I can't get the entire solution can any one help me with clues or hints in > how to do it? > > Thank you in advance. > > > *----------------------------------------* > > > *Mart?n Trujillo Raddatz Puerto Montt - Chile Tel?fono: > +59 9 96427814 * > *----------------------------------------* > > > > ---------- Forwarded message ---------- > From: Tim Roberts > To: Python-Win32 List > Cc: > Bcc: > Date: Sat, 23 May 2020 23:28:10 -0700 > Subject: Re: [python-win32] How to install pywin32 for Text only/TTY, > excluding all GUI components > On May 23, 2020, at 4:27 AM, Markus Kramer > wrote: > > > Hello, > I would like to discuss and contribute to an alternative pip package > without GUI: > - pip install pywin32 continues as is, e.g. includes Pythonwin. > - pip install pywin32nogui would contain no GUI components, e.g. MFC.dll. > What are your thoughts? > > > What is the point? Installing a package does not mean you are required to > use all of it. If you ship a package that doesn?t need the UI components, > then your package will not include the components. > ? > 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 markuskramerigitt at gmail.com Sun May 24 13:51:13 2020 From: markuskramerigitt at gmail.com (Markus Kramer) Date: Sun, 24 May 2020 19:51:13 +0200 Subject: [python-win32] Separate smaller wheels? Message-ID: Greetings, maybe the current, single pywin32 wheel could be separated into smaller ones, e.g.: com, comext, isapi, win32, Pythonwin,... (or others) The ?contains all? wheel should remain. I believe pypiwin32 (the predecessor to pywin32?) offered smaller wheels. The current setup.py is a large text, I think smaller texts are better to read and maintain. The removal of Python2 in setup.py could be followed by a refactoring into smaller pieces. What do you think? Best regards, Markus -------------- next part -------------- An HTML attachment was scrubbed... URL: From timr at probo.com Mon May 25 02:34:05 2020 From: timr at probo.com (Tim Roberts) Date: Sun, 24 May 2020 23:34:05 -0700 Subject: [python-win32] python-win32 Digest, Vol 205, Issue 5 In-Reply-To: References: Message-ID: <7FCA0A64-7A12-4BE7-B85A-F30D6B5DFBE4@probo.com> On May 24, 2020, at 9:21 AM, Markus Kramer wrote: > > The points are: > - Reduce vulnerability. The MFC library is large and (earlier? versions) contained CVE's. Whatever vulnerabilities there might be aren?t a factor if you aren?t using them. > - Reduce maintenance cost. By shipping less, you need to observe less, and patch less. You are missing the point. Pywin32 simply makes all those thing available to you. You don?t have to use them. And if you aren?t using the graphical interfaces, then you aren?t shipping them. The Python installer apps only include the things your script needs. If you don?t need graphics, then graphics DLLs won?t be included in your package. And your proposal will, of course, INCREASE the maintenance cost for the Pywin32 programmers, who now have to deal with multiple packages. > - Reduce resources. Less size mean less disk space and less network bandwidth. The MFC DLLs are about 100MB. At today?s mass storage prices, that?s 3/10 of one American penny. Network bandwidth will not be an issue for your applications, because MFC won?t be included in your application. > Then you wrote > > If you ship a package that doesn?t need the UI components, then your package will not include the components. > > This is my goal. > I don't get what you refer to with "package". > Currently, `pip install pywin32` will include the UI components, even if they are not needed. When I say ?package?, I mean an application package that you want to distribute, created by something like pyinstaller. It will only include the components your application needs. I just don?t see that there is anything to gain in making such a substantial change. ? Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From vernondcole at gmail.com Tue May 26 09:29:07 2020 From: vernondcole at gmail.com (Vernon D. Cole) Date: Tue, 26 May 2020 07:29:07 -0600 Subject: [python-win32] How to install pywin32 for Text only/TTY, excluding all GUI components In-Reply-To: References: Message-ID: Tim: I don't understand. If I include pywin32 as a pip requirement, then I get the whole thing, I think. How can I "ship a package" without carrying the unneeded parts around? On Sun, May 24, 2020 at 12:28 AM Tim Roberts wrote: > On May 23, 2020, at 4:27 AM, Markus Kramer > wrote: > > > Hello, > I would like to discuss and contribute to an alternative pip package > without GUI: > - pip install pywin32 continues as is, e.g. includes Pythonwin. > - pip install pywin32nogui would contain no GUI components, e.g. MFC.dll. > What are your thoughts? > > > What is the point? Installing a package does not mean you are required to > use all of it. If you ship a package that doesn?t need the UI components, > then your package will not include the components. > ? > 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 Wed May 27 00:09:05 2020 From: timr at probo.com (Tim Roberts) Date: Tue, 26 May 2020 21:09:05 -0700 Subject: [python-win32] How to install pywin32 for Text only/TTY, excluding all GUI components In-Reply-To: References: Message-ID: On May 26, 2020, at 6:29 AM, Vernon D. Cole wrote: > > I don't understand. If I include pywin32 as a pip requirement, then I get the whole thing, I think. How can I "ship a package" without carrying the unneeded parts around? I am under the impression that most people shipping Windows Python applications do so using something like Pyinstaller or Py2Exe, which packages up something that looks to the end user like a single executable, but which actually contains a zip file with the necessary modules and DLLs. The zip file only contains the parts of pywin32 that are actually required by the application. If you?re shipping your application via pip on WIndows, then virtually everyone will already have pywin32. It is a critical component. ? Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From markuskramerigitt at gmail.com Wed May 27 12:08:39 2020 From: markuskramerigitt at gmail.com (Markus Kramer) Date: Wed, 27 May 2020 18:08:39 +0200 Subject: [python-win32] python-win32 Digest, Vol 205, Issue 8 In-Reply-To: References: Message-ID: At the times predating pypi and wheels, how did you compile the swig interfaces? distutils, swig, or a third method? On Tue, May 26, 2020 at 6:01 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: Separate smaller wheels? (Dennis Lee Bieber) > 2. Re: How to install pywin32 for Text only/TTY, excluding all > GUI components (Vernon D. Cole) > > > > ---------- Forwarded message ---------- > From: Dennis Lee Bieber > To: python-win32 at python.org > Cc: > Bcc: > Date: Mon, 25 May 2020 13:12:51 -0400 > Subject: Re: [python-win32] Separate smaller wheels? > On Sun, 24 May 2020 19:51:13 +0200, Markus Kramer > declaimed the following: > > >I believe pypiwin32 (the predecessor to pywin32?) offered smaller wheels. > > pywin32 predates pypi... heck -- it even predates "wheels". It > used to > be a separate EXE download that had to be manually installed. It is/was > also a standard addition to the ActiveState Windows Python distributions. > > > -- > Wulfraed Dennis Lee Bieber AF6VN > wlfraed at ix.netcom.com > http://wlfraed.microdiversity.freeddns.org/ > > > > > > ---------- Forwarded message ---------- > From: "Vernon D. Cole" > To: Tim Roberts > Cc: Python-Win32 List > Bcc: > Date: Tue, 26 May 2020 07:29:07 -0600 > Subject: Re: [python-win32] How to install pywin32 for Text only/TTY, > excluding all GUI components > Tim: > I don't understand. If I include pywin32 as a pip requirement, then I > get the whole thing, I think. How can I "ship a package" without carrying > the unneeded parts around? > > > On Sun, May 24, 2020 at 12:28 AM Tim Roberts wrote: > >> On May 23, 2020, at 4:27 AM, Markus Kramer >> wrote: >> >> >> Hello, >> I would like to discuss and contribute to an alternative pip package >> without GUI: >> - pip install pywin32 continues as is, e.g. includes Pythonwin. >> - pip install pywin32nogui would contain no GUI components, e.g. >> MFC.dll. >> What are your thoughts? >> >> >> What is the point? Installing a package does not mean you are required >> to use all of it. If you ship a package that doesn?t need the UI >> components, then your package will not include the components. >> ? >> 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 >> > _______________________________________________ > 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 lukaszj72 at gmail.com Sun May 31 11:55:30 2020 From: lukaszj72 at gmail.com (=?iso-8859-2?B?o3VrYXN6IEpha3Vib3dza2k=?=) Date: Sun, 31 May 2020 17:55:30 +0200 Subject: [python-win32] Make win32traceutil work in v227 Message-ID: Hello, python 3.8.2+pywin32 227 on Windows 10, everything 64bit In an active scripting file I imported win32traceutil to use it further to debug CDispatch (just imported, did not change anything else). But merely running the script causes displaying in Trace Collector: "Debugging extensions (axdebug) module does not exist - debugging is disabled..". Also, pretty obviously, trace() is not working - its usage causes displaying the same message. How should I set up win32traceutil properly? Regards, Lukasz