embedding in COM object confusion

Achim Domma domma at procoders.net
Sun Jun 1 07:46:52 EDT 2003


"Mark Hammond" <mhammond at skippinet.com.au> wrote in message
news:iMxAa.3178$ES.34565 at news-server.bigpond.net.au...
> Actually, I meant to reproduce in a standard C program rather than a COM
> object.  I would be surprised if COM is the issue, but more the way the
> Python API is being used (either in error, or in such a way as to expose
> a bug)

I'm quite sure that COM is the an problem. I called the object via JScript
and it works fine. Then I build a COM exe server. This way the COM object
will have his own python dll and it works fine also. For me, this looks like
the doubled interpreter is a problem, but I don't understand if it's my
fault.

I moved now back to VC6 and build a python22_d.dll/lib and a python_d.exe.
All files are copied to my Python installation (c:\python22). But with this
version I can not import win32com.client. Here is an interactive session:

K:\bosch\COM\VC6_Test>python_d
Adding parser accelerators ...
Done.
Python 2.2.3c1 (#41, Jun  1 2003, 13:20:10) [MSC 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from win32com.client import Dispatch
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "C:\Python22\Lib\site-packages\win32com\__init__.py", line 5, in ?
    import win32api, sys
ImportError: No module named win32api
[8430 refs]
>>> import sys
[8432 refs]
>>> sys.path
['', 'C:\\Python22\\Lib\\site-packages\\Pythonwin',
'C:\\Python22\\Lib\\site-packages\\win32',
'C:\\Python22\\Lib\\site-packages\\win32\\lib',
'C:\\Python22\\Lib\\site-packages', 'C:\\Python22\\DLLs',
'C:\\Python22\\lib', 'C:\\Python22\\lib\\lib-tk', 'C:\\Python22',
'C:\\Python22\\lib\\site-packages\\Numeric']
[8439 refs]
>>>

win32api.pdy is in C:\Python22\Lib\site-packages\win32. Do I need to rebuild
it also as debug version? Any help to get an debug version up and running
would be very appreciated.

Achim






More information about the Python-list mailing list