Python Forum
a function to get IP addresses of interfaces
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
a function to get IP addresses of interfaces
#1
i am looking around for a function that can return IP addresses of named interfaces, supporting both IPv4 and IPv6. a function that can return a list of interface names is a plus.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
Could see if netifaces module would work for you.
Skaperen likes this post
Reply
#3
(May-30-2022, 07:22 AM)bowlofred Wrote: Could see if netifaces module would work for you.
it looks like it should work. it would be better than running the "ip" command in Linux and parsing its output. that, plus it is a small implementation in C that could help me learn the basics of using C within Python.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Right way to implement interfaces yossiy123 1 1,289 May-12-2022, 10:31 AM
Last Post: Gribouillis
  Loop through list of ip-addresses [SOLVED] AlphaInc 7 4,045 May-11-2022, 02:23 PM
Last Post: menator01
  instance methods sharing addresses mim 1 2,256 Mar-28-2021, 05:22 AM
Last Post: deanhystad
  Convert email addresses to VCF format jehoshua 2 4,715 Mar-06-2021, 12:50 AM
Last Post: jehoshua
  crunching ip addresses snichols 5 2,841 Nov-10-2020, 05:24 PM
Last Post: snichols
  extract email addresses from gmail vigneshboolog 0 1,792 Feb-11-2020, 09:23 AM
Last Post: vigneshboolog
  Extract email addresses from string and store them in a list oslosurfer 2 2,726 Nov-24-2019, 03:35 PM
Last Post: oslosurfer
  Read list of IP addresses from file and return a network dflick 4 4,927 Oct-27-2018, 09:33 AM
Last Post: buran
  Help required to print MAC addresses anna 50 20,888 Feb-22-2018, 09:53 AM
Last Post: anna
  How do I get coordinates for addresses from the csv list? BigD 6 7,894 Dec-02-2017, 09:38 PM
Last Post: BigD

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020