Try this from python with pythonNet installed (the current directory is
assumed to contain Adapter.dll):
import clr
clr.AddReference("Adapter")# Load the Adapter.dll
from AAA.BBB import Adapter# Get the Adapter class type
adapter = Adapter() # Create instance of the Adapter class
a
How about skip the import giving the error and call:
clr.AAA.BBB.Adapter()
I really don't know much about C#, or nested namespaces being called
from python.net. You could try making a simpler C# dll and getting that
to work and isolate the issue, which I think is the dot notated nested
namespa
Thank you for the reply.
I did
>>> import clr
>>> from System.Reflection import Assembly
>>> Assembly.LoadWithPartialName("Adapter")
>>> from AAA.BBB import Adapter
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named AAA.BBB
I don't know why I got this. :-(
An
What I use is:
import clr
from System.Reflection import Assembly
Assembly.LoadWithPartialName('Demo')
from Render import Demo
where the C# code has namespace Render and public class Demo.
-Manuel
On 04/18/2013 02:45 PM, Seungweon Park wrote:
Hi,
I have Adapter.dll with namespace 'AAA.BBB.Ada
Hi,
I have Adapter.dll with namespace 'AAA.BBB.Adapter" written in C# which
gives network adapter information.
I want to call one of method GetSpeed(). I don't know How to create an
instance in python.
Would you give me some clue for writing the same python code like below
powershell script using