Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #205374

Re: get my ip address

From <tomas@tuxteam.de>
Newsgroups linux.debian.user
Subject Re: get my ip address
Date 2019-02-15 11:50 +0100
Message-ID <xrJea-2rs-11@gated-at.bofh.it> (permalink)
References <xrJ4u-2o3-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Fri, Feb 15, 2019 at 11:11:29AM +0100, tony wrote:
> Hi all,
> 
> Debian 9. I need to read my IPv6 address into a python script.

You don't have "an IP address". Your host has, and it has zero or
more (potentially many) IP addresses. With IPV6, you'll almost
certainly end up with more than one per interface.

> I am aware that I can call ip a and parse the result. The parsing,
> whilst quite achievable, is slightly tricky, but I can manage the RE, so
>  that's not my question.
> 
> Is there any other way to obtain this data, maybe from /sys?

Try a DuckDuckGo search for ["IP address" site:docs.python.org/3]

Here [1] is a link for your convenience.

Cheers
[1] https://duckduckgo.com/html?q=%22IP%20address%22+site:docs.python.org/3
-- tomás

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

get my ip address tony <lists@vanderhoff.org> - 2019-02-15 11:40 +0100
  Re: get my ip address <tomas@tuxteam.de> - 2019-02-15 11:50 +0100
  Re: get my ip address Markus Schönhaber <debian-user@list-post.mks-mail.de> - 2019-02-15 12:10 +0100
    Re: get my ip address David Wright <deblis@lionunicorn.co.uk> - 2019-02-15 17:00 +0100
      Re: get my ip address David Wright <deblis@lionunicorn.co.uk> - 2019-02-16 01:00 +0100
        Re: get my ip address John Crawley <john@bunsenlabs.org> - 2019-02-16 03:20 +0100
          Re: get my ip address David Wright <deblis@lionunicorn.co.uk> - 2019-02-16 06:30 +0100
            Re: get my ip address John Crawley <john@bunsenlabs.org> - 2019-02-17 05:00 +0100
              Re: get my ip address David Wright <deblis@lionunicorn.co.uk> - 2019-02-20 05:40 +0100
      Re: get my ip address tony <lists@vanderhoff.org> - 2019-02-16 11:20 +0100
        Re: get my ip address David Wright <deblis@lionunicorn.co.uk> - 2019-02-20 05:40 +0100
  Re: get my ip address Greg Wooledge <wooledg@eeg.ccf.org> - 2019-02-19 16:20 +0100
    Re: get my ip address tony <lists@vanderhoff.org> - 2019-02-19 16:50 +0100
      Re: get my ip address Dan Ritter <dsr@randomstring.org> - 2019-02-19 17:40 +0100
        Re: get my ip address tony <lists@vanderhoff.org> - 2019-02-19 18:10 +0100
        Re: get my ip address Greg Wooledge <wooledg@eeg.ccf.org> - 2019-02-19 18:10 +0100
        Re: get my ip address tony <lists@vanderhoff.org> - 2019-02-20 11:40 +0100
          Re: get my ip address Dan Ritter <dsr@randomstring.org> - 2019-02-20 13:30 +0100
            Re: get my ip address tony <lists@vanderhoff.org> - 2019-02-20 14:00 +0100
  Re: get my ip address Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM> - 2019-02-28 15:40 +0100

csiph-web