unable to import win32api into an embedded python interpreter.

pjd pjdurai at hotmail.com
Wed Oct 9 00:50:12 CEST 2002


Here is my problem.

I have embedded python 22 in a c++ program. Everything works as expected, I
am able to execute external scripts.
But when I do an 'import win32api' in the script I am trying to execute, it
The same script works fine when executed from prompt as 'python

I am able to import other modules in my embedded interpreter. e.g.  'from
xml.dom import minidom'

I suspect the following reasons

1 ) path of the executable is different from that of Python executable.
Ofcourse my executable with embedded python interpreter lives in another
directory, under a different name.
2) Modules in C:\Python22\Lib import well.  But may be from site-packages
dont work well ?  I am not sure about this.

I am stumped.

Appreciate your time

My setup.
ActivePython 22
MS Visual c++ 6 SP5

More information about the Python-list mailing list