Issue with using a .net class in ironpython -
If I have a net class that is not part of any namespace, then I'm not able to use it in iron python I am
For example
Suppose I have the FULB.LL assembly with the definition of the following class
// Note that the following class is part of the global namespace
public class Foo {}
Now I try to use it as an iron
< Blockquote>clr.AddReference ("FooLib") # This call is successful.
f = Foo ()
returns the line f = foo ()
< P> I tried the followingtraceback (The most recent call last): Error in name:
File "", line 1, in
Name: 'Foo' is not defined
from FooLib import
f = Foo ()
line FooLib import * reports an error that makes sense because the clause should be used because namespace and assembly are not
However, The square fu is related to some namespaces, so I have no problem importing it into harmful
Therefore, my query is that I
You have a global name space associated with it. To use a blank import
:
import clr clr.AddReference ("FooLib") # This call is successful Foo f = Foo ()
Comments
Post a Comment