unable to import win32api into an embedded python interpreter.
Mark Hammond
mhammond at skippinet.com.au
Tue Oct 8 19:04:21 EDT 2002
pjd wrote:
> Hi
>
> 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
> barfs.
> The same script works fine when executed from prompt as 'python
> myscript.exe'.
>
> 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.
>
What exception do you get?
win32apimodule.pyd depends on pywintypes22.dll - is that on your PATH?
(Not PYTHONPATH but, system PATH)
Mark.
More information about the Python-list
mailing list