[IronPython] How to set a namespace for IronPython classes?
fuzzyman at voidspace.org.uk
Fri Oct 17 05:26:16 PDT 2008
Vladimir Eremeev wrote:
> Hi all.
> I am very new to the IronPython and to .NET
> I have installed IronPython v2.0 beta 5 and the IronPythonStudio,
> integrated in MS VisualStudio 2008.
> I have created a simple IronPython project containing one form and compiled
> it to the class library.
> However, when I have opened the resulting DLL in the Studio's Object
> Browser, I have seen that classes are in the global namespace, while other
> system classes are in their own namespaces.
> How do I create a namespace and put my classes to it?
Python as a language uses modules and packages to do namespacing rather
than .NET namespaces. This means that introspecting assemblies compiled
from Python code to examine their *structure* is not really useful.
If you want to *use* those classes from .NET (say from C#) you will need
to do it through the IronPython hosting API rather than directly
referencing the compiled assemblies anyway.
What are you actually trying to achieve?
More information about the Users