Hi Amit,

[EMAIL PROTECTED] wrote:
> +    assembliesToScan = [ "/usr/lib/mono/1.0/mscorlib.dll",
> +                         "/usr/lib/mono/1.0/System.dll",
> +                         "/usr/lib/mono/1.0/System.Web.dll",
> +                         "/usr/lib/mono/1.0/System.Data.dll",
> +                         "/usr/lib/mono/1.0/System.Xml.dll",
> +                         "/usr/lib/mono/1.0/System.Drawing.dll"
> +                    ]
> +    assems = []
> +    for assemblyName in assembliesToScan:
> +        assems.append(System.Reflection.Assembly.LoadFile(assemblyName))

sorry for bugging you again :-),
but this is not what we want.

We don't need to preload assemblies that the user might not want. For 
example, in IronPython to access the System.Xml namespace you need to 
explicitly load System.Xml.dll by using one of the clr.LoadAssembly* 
methods.

Moreover, what happens if I wanto to load an assembly that it's not on 
this list? And what if I load an assembly after the list of namespaces 
has already been computed?

I think what you need to do is to maintain a cache of valid namespaces, 
and check whether a new assembly has been loaded every time you import 
something.
You can easily get the list of currently loaded assemblies by calling 
AppDomain.CurrentDomain.GetAssemblies().

ciao Anto
_______________________________________________
pypy-dev@codespeak.net
http://codespeak.net/mailman/listinfo/pypy-dev

Reply via email to