Hello All,
First time crawling in .NET and was wondering how to access the list
of network interfaces.
I am following a C# example from MSDN that goes something like this:
<C#>
NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces();
</C#>
Then they iterate over adapters to list the interfaces.
In IronPython, I am trying to do this:
<IronPython>
import clr
clr.AddReference('System.Net')
from System.Net import NetworkInterface
a[] = NetworkInformation.GetAllNetworkINterfaces()
</IronPython>
Then I will iterate over a to list.
It returns an Attribute error and says that GetAllNetworkInterfaces of
'NameSpace#' object is read only.
This is a strange error to me since I am trying to read from not write to.
What have I messed up here?
Thanks,
-Kris
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com