pywin32 Questions

5

I am using pyinstaller to generate an executable code for my python.py file. However, I am getting this error: File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\Py...
Genus asked 5/10, 2023 at 17:50

10

This is my code, and I found many answers for VBA, .NET framework and is pretty strange. When I execute this, Excel closes. from win32com.client import DispatchEx excel = DispatchEx('Excel.Applica...
Convoluted asked 19/4, 2012 at 3:12

10

Solved

I am using pywin32 to read/write to an Excel file. I have some dates in Excel, stored in format yyyy-mm-dd hh:mm:ss. I would like to import those into Python as datetime.datetime objects. Here is t...
Zielinski asked 18/8, 2016 at 22:12

6

Solved

How can I get Windows special folders like My Documents, Desktop, etc. from my Python script? Do I need win32 extensions? It must work on Windows 2000 to Windows 7.
Atheistic asked 4/10, 2010 at 20:26

1

I've been playing around with trying to setup Python scripts (Both .PY and .EXE via Pyinstaller) as Windows Services. My challenge has been that most problems encountered don't seem to relate to my...
Paratrooper asked 26/2, 2020 at 14:2

6

Solved

We're getting an Excel file from a client that has open protection and Write Reserve protection turned on. I want to remove the protection so I can open the Excel file with the python xlrd module. ...
Koan asked 18/12, 2014 at 22:22

33

Solved

I'm setting up an autoclicker in Python 3.8 and I need win32api for GetAsyncKeyState but it always gives me this error: >>> import win32api Traceback (most recent call last): File "&...
Druse asked 29/10, 2019 at 17:8

17

I am using Python 2.7 and I want to use pywin32-214 on Windows 7. I installed pywin32-214 by using the MSI installer. But when I import win32api in my Python script, it throws the error: no m...
Berkow asked 24/1, 2014 at 22:39

7

Solved

I've got a Windows 7 environment where I need to develop a Python Windows Service using Python 3.4. I'm using pywin32's win32service module to setup the service and most of the hooks seem to be wor...
Busyness asked 9/1, 2016 at 17:45

3

Solved

My code is #Opens template for creating final report excel = win32.dynamic.Dispatch('Excel.Application') template = os.path.abspath((folderpath+'\Poop.xlsx')) wb = excel.Workbooks.Open(template) ...
Monosymmetric asked 18/6, 2013 at 19:47

9

Solved

Running Python 3.4 on Windows 7. I need to copy what's stored in the clipboard to a variable in my python program. I've seen on Stack Overflow that that can be done either with pywin32 or tkinter. ...
Balanchine asked 3/7, 2014 at 17:12

3

Solved

HttpPlatformHandler supports forwarding the auth token by enabling the forwardWindowsAuthToken setting in the web.config. This sounds like a useful feature when needing to use Windows Integrated Au...

4

Solved

I downloaded the win32 for python 2.6 from this site. This is the code to get/set the clipboard. def test(): OpenClipboard() d=GetClipboardData(win32con.CF_TEXT) # get clipboard data SetClip...
Cyder asked 30/9, 2010 at 3:35

3

Solved

When I try to run this code as is I get this error "IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch) pywintypes.com_error: (-2147221008, 'CoInitialize has no...
Marque asked 7/4, 2020 at 0:33

2

Solved

I'm trying add some shell extensions using python with icons and a sub menu but I'm struggling to get much further than the demo in pywin32. I can't seem to come up with anything by searching googl...
Birck asked 31/5, 2012 at 12:33

3

Solved

I tried both pip install pypiwin32 and pip install pywin32 and they both succeeded on my Windows 7 x64 / Python 2.7.15 64-bit (it's the only Python I have installed on my PC). I even did: p...
Bodiless asked 4/6, 2018 at 14:56

1

Solved

I was creating a voice assistant project but I am having problem with the line with with command in it. The code I've written is this import speech_recognition as sr import win32com.client speaker...
Succeed asked 17/5, 2023 at 14:5

2

I need to copy data from three excel files & paste into three different excel files. Error: ('F', 'C:\\Users\\jmp655972\\Desktop\\SOFTWARE DEVELOPMENT\\Folder Creation Format\\Base Vehicle La...
Emden asked 19/11, 2013 at 9:28

2

Solved

I've got this bit of code, and it works... But it runs very slow: hwin = win32gui.GetDesktopWindow() width = win32api.GetSystemMetrics(win32con.SM_CXVIRTUALSCREEN) height = win32api.GetSystemMetri...
Wotton asked 21/1, 2017 at 23:49

3

Solved

Running python 3.6 on windows 8. ModuleNotFoundError: No module named 'win32gui' I have tried multiple installations of pywin32 but none have worked so far. https://sourceforge.net/projects/pywin3...
Nearsighted asked 19/5, 2017 at 6:54

11

Does anyone know of a way to make/read symbolic links across versions of win32 from Python? Ideally there should be a minimum amount of platform specific code, as I need my app to be cross platform...
Milka asked 19/9, 2009 at 2:44

2

Solved

I am trying to create a new value under the Run key in Windows 7. I am using Python 3.5 and I am having trouble writing to the key. My current code is creating a new key under the key I am trying t...
Grison asked 5/3, 2017 at 6:0

4

Solved

I'm trying to open an image file and copy the image to the Windows clipboard. Is there a way to fix this: import win32clipboard from PIL import Image def send_to_clipboard(clip_type, data): win...
Retread asked 13/8, 2011 at 12:35

4

I have the 32 bit version of python 3.4 installed. I'm trying to use the win32crypt module after installing pywin32 but I get the following error message in git CLI: import win32crypt ImportError:...
Candlepower asked 1/5, 2014 at 11:18

28

I have a log file being written by another process which I want to watch for changes. Each time a change occurs I'd like to read the new data in to do some processing on it. What's the best way to...
Patriotism asked 8/10, 2008 at 11:12

© 2022 - 2024 — McMap. All rights reserved.