ActivePython 2.3 and I select the library Microsoft Word 10.0 Object
Library (8.2), things work fine.
When I have WindowsXP, ActivePython 2.4 (build 247) and Microsoft Word
11.0 Object Library (8.3), then I get the following SyntaxError, and on
two different computers I tested this. More on the error below, but has
anyone else had this problem? Will there soon be a newer build of
ActivePython? I've never used the standard Python distribution with
manually installed win32all package, just because its so easy to deploy
ActivePython. Should I consider switching, now that I'm on the topic?
Generating to C:\Python24\lib \site-packages\win32c om\gen_py\00020 905-0000-0000-C000-000000000046x0x 8x3\__init__.py
Building definitions from type library...
Generating...
Importing module
Failed to execute command:
from win32com.client import makepy;makepy.m ain()
Traceback (most recent call last):
File
"C:\Python24\Li b\site-packages\python win\pywin\frame work\toolmenu.p y",
line 103, in HandleToolComma nd
exec "%s\n" % pyCmd
File "<string>", line 1, in ?
File "C:\Python24\li b\site-packages\win32c om\client\makep y.py", line
363, in main
GenerateFromTyp eLibSpec(arg, f, verboseLevel = verboseLevel,
bForDemand = bForDemand, bBuildHidden = hiddenSpec)
File "C:\Python24\li b\site-packages\win32c om\client\makep y.py", line
274, in GenerateFromTyp eLibSpec
gencache.AddMod uleToCache(info .clsid, info.lcid, info.major,
info.minor)
File "C:\Python24\Li b\site-packages\win32c om\client\genca che.py",
line 555, in AddModuleToCach e
mod = _GetModule(fnam e)
File "C:\Python24\Li b\site-packages\win32c om\client\genca che.py",
line 634, in _GetModule
mod = __import__(mod_ name)
File
"C:\Python24\li b\site-packages\win32c om\gen_py\00020 905-0000-0000-C000-000000000046x0x 8x3\__init__.py ",
line 2831
'{00020960-0000-0000-C000-000000000046}' : 'Pane',
'{00020961-0000-0000-C000-000000000046}' : 'Windows',
^
SyntaxError: invalid syntax
I don't entirely understand the error (I'm rather ignorant of the whole
process Makepy is doing, come to think of it...). First of all, when I
load the file with the alleged syntax error into Scite, the line where
the caret is pointing to is actually 2838, not line 2831. Further, I
cannot detect any syntax errors based on visual inspection. In fact,
when I copy/paste lines 2830-2840 into a new script and put "d = {"
before the lines and "}" after the lines, it is syntactically valid
python that executes without complaint. I don't know how "dynamicall y"
this file is being generated, but somethin' ain't right.