Menu
  • HOME
  • TAGS

“exception: access violation writing” error in Python (ctypes)

python,activex,autocad,comtypes

I found the solution here: You have to uncomment two line, for me it's 862 and 863 in Python27\Lib\site-packages\comtypes\automation.py then it works with getAttributes()...

Python Visio to pdf

python,pdf,visio,comtypes

You should use ExportAsFixedFormat instead SaveAs. Documentation for this function you can find here. This function can be used with a win32 and a comtypes. win32com example import win32com.client visio = win32com.client.Dispatch("Visio.Application") doc = visio.Documents.Open('map.vsd') doc.ExportAsFixedFormat( 1, 'map.pdf', 1, 0 ) comtypes example import comtypes.client as coms visio = coms.CreateObject('Visio.Application')...

Data Type Conversion Error while trying to dynamically add columns(fields) from excel in MS-Access database using Python

excel,python-2.7,ms-access,xlrd,comtypes

A parameterized query allows parameters to be substituted for the values of a column, but not for table and column names themselves. You will need to use string formatting for that, as in db.Execute("ALTER TABLE MY_TABLE ADD COLUMN [{0}] TEXT(50)".format(cell_value)) ...