[Python.NET] importing Assembly
Brian Lloyd
brian at zope.com
Tue Feb 24 22:00:53 EST 2004
> I see that this has been asked before, but I must be missing something
>
> >>>import CLR.Company.Product.Module
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> ImportError: No module named Company
>
> The dll I have is called: "Company.Product.Module.dll", and is
> copied into
> the python root dir
>
> The source code for the module defines namespace as "namespace
> Company.Product.Module"
>
> Also I try the following:
>
> >>>from CLR.System.Reflection import Assembly
> >>>a = Assembly.LoadWithPartialName('Company.Product.Module')
> >>>import CLR.Company.Product.Module
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> ImportError: No module named Company
>
> please excuse any obvious ignorance of .NET terminology, it's
> something I've
> just started looking at.
Sorry I'm late on this - my spam filter starting eating some
of my mailing list email a week or so ago and I'm still catching
up :(
I'm curious whether you can use reflection to loop over the types
defined in your assembly after using LoadWithPartialName to load
it. What you are doing looks like it _should_ work fine.
Brian Lloyd brian at zope.com
V.P. Engineering 540.361.1716
Zope Corporation http://www.zope.com
More information about the PythonDotNet
mailing list