win32com client and McMillan installer 5.3b1

Gordon McMillan gmcm at hypernet.com
Fri Mar 29 08:26:07 EST 2002


[posted and mailed]

Francis Meyvis wrote:

> Hello,
> 
> I found a miserable work around.
> The pythoncom16.dll is somewhere under the WINNT.
> I copied this as pythoncom.dll and the thing now works.

You should *not* rename it (pure Python can import
it, but C code won't be able to). Of course, you
shouldn't have to do anything.
 
[from earlier msg]

>> I've a bunch of python scripts that I'd like to convert into and exe.
>> This works well with the McMillan Installer except the script that
>> uses the win32com client stuff to access worksheets in an excell
>> document. From the traceback I see that there's an import error:
>> "No module named pythoncom"
>>
>> I tried it with McMillan installer 5.3b1 on
>> NT5 with python 2.2 and Mark Hammond's associated win32 extentions
>> NT4 with python 1.6 and Mark Hammond's associated win32 extentions

I don't have Mark's extensions for Python22, but I just built the
testMSOffice.py test in e2etests/win32 without problem on Python21 
and Python 1.5.2 (using 5b3.1).

I can think of 2 things that might cause your problem:
 - you don't really have the win32 extensions installed
   (which you do, so that's not it)
 - rthooks.dat is missing or trashed

>> Both give me the same result.
>>
>> Can someone point me to what I'm doing wrong?
>> I did a
>> p22 Makespec.py --name=tst script.py
>> p22 Build.py script.py

I think you mean "p22 Build.py tst.spec", right?

>> I have some warnings about a delayed __import__
>> According to the doc these have to be taken serious.
>> But the doc does not explain in a clear way to me
>> what I should do about it.
>> Extend the path?, add the modules manually to the spec file?

For this you shouldn't have to do anything.
It should all be taken care of by rthooks.dat
and the scripts in support/rthooks.

-- Gordon
http://www.mcmillan-inc.com/




More information about the Python-list mailing list