Questions tagged [pywin]

pywin is a python module, lightweight launcher and switcher for Windows command line and MSYS/MINGW32

pywin is a python module, lightweight launcher and switcher for Windows command line and MSYS/MINGW32.

52 questions
77
votes
2 answers

Why can't I find any pywin32 documentation/resources

I cannot find pywin32 documentation or even a little synopsis of what the module is (I am aware its for win32 API stuff). Is there any pywin32 documentation or resources? Maybe some examples?
in70x
  • 1,170
  • 1
  • 10
  • 16
50
votes
13 answers

How to start IDLE (Python editor) without using the shortcut on Windows Vista?

I'm trying to teach Komodo to fire up IDLE when I hit the right keystrokes. I can use the exact path of the shortcut in start menu in the Windows Explorer location bar to launch IDLE so I was hoping Komodo would be able to use it as well. But,…
Jason Dagit
  • 13,684
  • 8
  • 33
  • 56
7
votes
3 answers

Make a window transparent using Win32?

Using Python Win32 extensions, how do you make an arbitrary window on Windows XP transparent?
reckoner
  • 2,861
  • 3
  • 33
  • 43
6
votes
1 answer

Changing directory create times (ctime) using python in windows

I am trying to change the directory creation timestamp for a windows system using python. I have a directory that was copied over from another drive and the directory creation times are not preserved. This is what I am hoping to do, Step 1 : Read…
nitin
  • 7,234
  • 11
  • 39
  • 53
5
votes
1 answer

pywin32 win32gui GetPixel fails predictably near 10,000th call

When running the following block of code, GetPixel starts throwing errors at around the 10,000th call every time. If I put the code in a try-except statement and all calls after the initial faliure will fail. The only way to recover is to terminate…
John Smith
  • 51
  • 1
  • 2
3
votes
0 answers

Pyhook and pywin32 modules on 64 bit

I have been trying to install pyhook and pywin32 on my 64 bit windows 7 for python 3.5. I cannot seem to find the correct files, as any that i try either do not work, or work only on 32 bit. Does anyone have a link to recent versions that would work…
Vladamir
  • 247
  • 1
  • 3
  • 11
3
votes
1 answer

Windows Printer Dialog using python win32 api

I need the printer dialog(windows default print dialog which appears after ctrl+P) when I shall print a doc using python. How to do it?
Rafiul Sabbir
  • 626
  • 6
  • 21
2
votes
1 answer

Using COM automation server and PyQt

I want to create an application in PYTHON with graphical interface (using pyqt), with a COM automation server. So that COM clients could call this app using COM, and this would result in events in the main gui window. But I'm not sure how to…
user212322
  • 21
  • 1
2
votes
1 answer

Use pywin32 to go to specified page in word doc

I have a long word document with over 100 tables. I am trying to allow users to select a page number via python to enter data into the table on the specified page within the word document. I am able to enter data into a table with the following…
JohnnyW
  • 483
  • 2
  • 7
  • 16
2
votes
2 answers

Python: error opening excel workbook with win32com

I am trying to make a program to open existing excel files, in order to read and write their contents. I am already having trouble opening files. My code: def open_sheet(): excel = win32com.client.Dispatch("Excel.Application") wb =…
user4396936
  • 177
  • 2
  • 3
  • 11
1
vote
1 answer

Get urls of opened tabs in browser pywinauto python

Am trying to get all tabs in web browser Brave / Chrome window But don;t understand how to get the list. I am using python 3.8.13. Tried with tabs = dlg.Pane9.iter_descendants() but it results an object like
Adrian
  • 2,273
  • 4
  • 38
  • 78
1
vote
2 answers

Impossible to use pyttsx3: No module named 'pywintypes', but pywin32 is installed

I try to use speech synthesis in Python 3.9.13 [MSC v.1929 64 bit (AMD64)]. If I understand well, pyttxs3 is the dedicated module (thank you in advance for any possible alternative!), which I installed successfully: c:\>pip install -U…
Max
  • 415
  • 5
  • 12
1
vote
3 answers

how to convert pywintypes.datetime to different format

I have an object x which is as below x = '2020-06-15 00:00:00+00:00' print(x) 2020-06-15 00:00:00+00:00 print(type(x)) I want to convert above object to 2020-06-15 format and also to Year-Quarter format i.e. 2020…
Bogaso
  • 2,838
  • 3
  • 24
  • 54
1
vote
0 answers

How to write the formula =RTD() in excel with pywin32?

import win32com.client as win32 excelApp = win32.Dispatch("Excel.Application") wb = excel.Workbooks.Add() excel.Visible = True ws = wb.Worksheets("Planilha1") ws.Cells(1,1).Value=str('=RTD("RTDTrading.RTDServer";; "SIMH3_B_0";…
1
vote
3 answers

How can I save an excel chart as an image using python?

I am currently trying to use the win32com python library to open an excel file which contains a chart, and save that chart as an image in the same directory. I have tried the code below: import win32com.client as win32 from win32com.client import…
nernac
  • 175
  • 2
  • 9
1
2 3 4