[python-win32] Problems embedding in C++

Ishank Jain ishank_jain@hotmail.com
Tue, 16 Jul 2002 17:46:46 +0000


Hi,

I have been trying to run a simple python file from C++ using the 
PyRun_SimpleFile C api call.

Let the file I need to run be demo.py.
If the demo.py contains simple python commands such as:

print "Hello World"

my program works fine. But when i try to use something like:

import win32com
print "Hello World"

it gives me an error saying that it cannot find the win32api module. i 
checked the sys.path and it has the required path entries.

also if i run the demo.py file using the python win gui then it runs 
correctly. only when i run the file using the PyRun_SimpleFile call, it 
fails.

here is the traceback of the error:
-----------------------------
Traceback (most recent call last):
  File "..\hello.py", line 15, in ?
    import win32com
  File "C:\Python22\lib\site-packages\win32com\__init__.py", line 5, in ?
    import win32api, sys
ImportError: No module named win32api
[3929 refs]
-----------------------------

any help would be appreciated.

Ishank Jain
-----------------------------------------------
Graduate Student
Computer Engeering
University of Minnesota, Twin Cities
Voice: (Res) 612-331-9696 (Off) 612-626-0276
Email: ishank_jain@hotmail.com
-----------------------------------------------

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com