<div class="gmail_quote">On Sat, Feb 20, 2010 at 13:20, Lukas Cenovsky <span dir="ltr">&lt;<a href="mailto:cenovsky@bakalari.cz">cenovsky@bakalari.cz</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">Lukáš Duběda wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi there everyone,<br>
<br>
I&#39;m having problems importing a module, concretely win32com, from within<br>
IronPython.<br>
<br>
The problem is, when I run IronPython as a console, and add a path to<br>
the standard Python26 library, the module can be imported without<br>
any problems, but as soon as I try to embed IronPython and call<br>
it from within my application and then try to import the module,<br>
even though I&#39;d added the path to the sys.path prior to<br>
importing the module, it still throws an error saying:<br>
&quot;No module named win32api&quot;.<br>
<br>
I don&#39;t know what to do now. I&#39;ve tried to manually add<br>
all the sub-directories of the Lib direcotry from Python26.<br>
I tried to copy the module&#39;s files to IronPython Lib directory,<br>
but nothing worked.<br>
<br>
Thanks a lot in advance, cheers,<br>
</blockquote>
<br></div>
I don&#39;t know why you can&#39;t import the win32com module but I would not use it at all.<br>
<br>
I would rather use the Win32 API directly from IronPython via clrtype and pinvoke or via C# stub. For C# stub example see my blog: <a href="http://gui-at.blogspot.com/2008/07/simulate-users-input.html" target="_blank">http://gui-at.blogspot.com/2008/07/simulate-users-input.html</a><br>
<br></blockquote><div> </div><div>What&#39;s wrong with win32com/win32api...?<br></div></div>