[Tutor] Word COM interface
Chuck Allison
chuck at freshsources.com
Fri Jun 10 04:59:36 CEST 2005
Hello,
Does anyone know how to get the Microsoft Word 11.0 Object library
working in ActiveState Python 2.4.1? When I go into PythonWin and try
to load it under makePy, I get the following error:
>>> Generating to C:\Python24\lib\site-packages\win32com\gen_py\00020905-0000-0000-C000-000000000046x0x8x3.py
Failed to execute command:
from win32com.client import makepy;makepy.main()
Traceback (most recent call last):
File "C:\Python24\Lib\site-packages\pythonwin\pywin\framework\toolmenu.py", line 103, in HandleToolCommand
exec "%s\n" % pyCmd
File "<string>", line 1, in ?
File "C:\Python24\Lib\site-packages\win32com\client\makepy.py", line 362, in main
GenerateFromTypeLibSpec(arg, f, verboseLevel = verboseLevel, bForDemand = bForDemand, bBuildHidden = hiddenSpec)
File "C:\Python24\Lib\site-packages\win32com\client\makepy.py", line 273, in GenerateFromTypeLibSpec
gencache.AddModuleToCache(info.clsid, info.lcid, info.major, info.minor)
File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 550, in AddModuleToCache
mod = _GetModule(fname)
File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 629, in _GetModule
mod = __import__(mod_name)
File "C:\Python24\lib\site-packages\win32com\gen_py\00020905-0000-0000-C000-000000000046x0x8x3\__init__.py", line 2831
'{00020960-0000-0000-C000-000000000046}' : 'Pane',
'{00020961-0000-0000-C000-000000000046}' : 'Windows',
^
SyntaxError: invalid syntax
Any clue?
--
Best regards,
Chuck
More information about the Tutor
mailing list