[Python.NET] Problem installing

Brian Lloyd brian at zope.com
Tue Oct 28 11:48:36 EST 2003


> I downloaded the files.  I can run the demo in your version
> of python but not in my existing version of python 2.3.
>
> <snip>
>
> I get the error
>
>
> D:\Python23>python d:\pythonnet\pythonnet-1.0-beta1\demo\helloform.py
> Traceback (most recent call last):
>   File "d:\pythonnet\pythonnet-1.0-beta1\demo\helloform.py", line 12, in ?
>     import CLR.System.Windows.Forms as WinForms
> ImportError: No module named System.Windows.Forms
>
> Any help very much appreciated.

Ahhhh - this appears to be related to a particular frailty of the
import hook I use, and the fact that what happens the first time
you 'import CLR' is slightly different when you run using the
managed wrapper vs. the extension module.

I'll take a look at it - in the meantime you can just add an
'import CLR' line above the other imports in the demo scripts
to get around the problem.


Brian Lloyd        brian at zope.com
V.P. Engineering   540.361.1716
Zope Corporation   http://www.zope.com
David




More information about the PythonDotNet mailing list