Since you probably are going to develop platform dependent code
anyway, why not just parse the output from the following command?
system_profiler -xml SPNetworkDataType
Cheers
//Jan
On Mon, Feb 27, 2012 at 07:24, Leo <[email protected]> wrote:
> On 2012-02-27 08:44 +0800, Nicholas Riley wrote:
>> That script is an excellent example of how not to do things; it makes
>> assumptions about constant values and structure layout that may not
>> hold true on one operating system, much less between operating
>> systems.
>>
>> You are almost certainly better off using another mechanism. What
>> interface information are you trying to obtain?
>
> The interface names and the addresses bound to them. Much like
> network-interface-list (http://paste.pocoo.org/show/556841/) in Emacs,
> which returns:
>
> (("en1" . [10 0 0 114 0]) ("lo0" . [127 0 0 1 0]))
>
> Leo
>
> _______________________________________________
> Pythonmac-SIG maillist - [email protected]
> http://mail.python.org/mailman/listinfo/pythonmac-sig
> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
_______________________________________________
Pythonmac-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG