Re: get my ip address

2019-02-28 Thread Jonathan de Boyne Pollard
tony; I am aware that I can call ip a and parse the result. [...] Is there any other way to obtain this data, maybe from /sys? just call libc.getifaddrs() directly. * http://programmaticallyspeaking.com./getting-network-interfaces-in-python.html

Re: get my ip address

2019-02-20 Thread tony
On 20/02/2019 13:24, Dan Ritter wrote: > tony wrote: >> This thread has now drifted from my asking whether there was any way of >> interrogating the hardware to obtain the current IP6 address of host - >> apparently not > > The hardware doesn't know IP addresses. The kernel knows those. > > $ i

Re: get my ip address

2019-02-20 Thread Dan Ritter
tony wrote: > This thread has now drifted from my asking whether there was any way of > interrogating the hardware to obtain the current IP6 address of host - > apparently not The hardware doesn't know IP addresses. The kernel knows those. $ ip -6 a show eth0 2: eth0: mtu 1500 state UP qlen 10

Re: get my ip address

2019-02-20 Thread tony
On 19/02/2019 17:36, Dan Ritter wrote: > tony wrote: >> On 19/02/2019 16:10, Greg Wooledge wrote: >>> On Fri, Feb 15, 2019 at 11:11:29AM +0100, tony wrote: Debian 9. I need to read my IPv6 address into a python script. >>> >>> Why? >>> >>> may offer som

Re: get my ip address

2019-02-19 Thread David Wright
On Sat 16 Feb 2019 at 11:16:23 (+0100), tony wrote: > On 15/02/2019 16:52, David Wright wrote: > > On Fri 15 Feb 2019 at 12:02:20 (+0100), Markus Schönhaber wrote: > >> Tony, 15.2.2019, 11:11:29 +0100: > >> > >>> Debian 9. I need to read my IPv6 address into a python script. > >>> > >>> I am aware

Re: get my ip address

2019-02-19 Thread David Wright
On Sun 17 Feb 2019 at 12:51:34 (+0900), John Crawley wrote: > On 16/02/2019 14.28, David Wright wrote: > > On Sat 16 Feb 2019 at 11:10:32 (+0900), John Crawley wrote: > > > On 16/02/2019 08.54, David Wright wrote: > > > > On Fri 15 Feb 2019 at 22:04:42 (+), Darac Marjal wrote: > > > > > If you'

Re: get my ip address

2019-02-19 Thread Greg Wooledge
On Tue, Feb 19, 2019 at 11:36:49AM -0500, Dan Ritter wrote: > tony wrote: > > I have a network of IoTs consisting of 5 (I think) Paspberry Pis, > > monitoring various things, and periodically sending the data to my VPS. > > I need access to these hosts to manage them. > > > > The network supplier

Re: get my ip address

2019-02-19 Thread tony
On 19/02/2019 17:36, Dan Ritter wrote: > tony wrote: >> On 19/02/2019 16:10, Greg Wooledge wrote: >>> On Fri, Feb 15, 2019 at 11:11:29AM +0100, tony wrote: Debian 9. I need to read my IPv6 address into a python script. >>> >>> Why? >>> >>> may offer som

Re: get my ip address

2019-02-19 Thread Dan Ritter
tony wrote: > On 19/02/2019 16:10, Greg Wooledge wrote: > > On Fri, Feb 15, 2019 at 11:11:29AM +0100, tony wrote: > >> Debian 9. I need to read my IPv6 address into a python script. > > > > Why? > > > > may offer some insight. > > > > Well, I'm sure you

Re: get my ip address

2019-02-19 Thread tony
On 19/02/2019 16:10, Greg Wooledge wrote: > On Fri, Feb 15, 2019 at 11:11:29AM +0100, tony wrote: >> Debian 9. I need to read my IPv6 address into a python script. > > Why? > > may offer some insight. > Well, I'm sure you don't really want to know, and I

Re: get my ip address

2019-02-19 Thread Greg Wooledge
On Fri, Feb 15, 2019 at 11:11:29AM +0100, tony wrote: > Debian 9. I need to read my IPv6 address into a python script. Why? may offer some insight.

Re: get my ip address

2019-02-16 Thread John Crawley
On 16/02/2019 14.28, David Wright wrote: On Sat 16 Feb 2019 at 11:10:32 (+0900), John Crawley wrote: On 16/02/2019 08.54, David Wright wrote: On Fri 15 Feb 2019 at 22:04:42 (+), Darac Marjal wrote: If you're going to recommend parsing `ip`, the -j option may be more amenable to scripting.

Re: get my ip address

2019-02-16 Thread Darac Marjal
On 16/02/2019 05:28, David Wright wrote: > On Sat 16 Feb 2019 at 11:10:32 (+0900), John Crawley wrote: >> On 16/02/2019 08.54, David Wright wrote: >>> On Fri 15 Feb 2019 at 22:04:42 (+), Darac Marjal wrote: If you're going to recommend parsing `ip`, the -j option may be more amenabl

Re: get my ip address

2019-02-16 Thread tony
On 15/02/2019 16:52, David Wright wrote: > On Fri 15 Feb 2019 at 12:02:20 (+0100), Markus Schönhaber wrote: >> Tony, 15.2.2019, 11:11:29 +0100: >> >>> Debian 9. I need to read my IPv6 address into a python script. >>> >>> I am aware that I can call ip a and parse the result. The parsing, >>> whilst

Re: get my ip address

2019-02-15 Thread David Wright
On Sat 16 Feb 2019 at 11:10:32 (+0900), John Crawley wrote: > On 16/02/2019 08.54, David Wright wrote: > > On Fri 15 Feb 2019 at 22:04:42 (+), Darac Marjal wrote: > > > If you're going to recommend parsing `ip`, the -j option may be more > > > amenable to scripting. (JSON output) > > > > > > O

Re: get my ip address

2019-02-15 Thread John Crawley
On 16/02/2019 08.54, David Wright wrote: On Fri 15 Feb 2019 at 22:04:42 (+), Darac Marjal wrote: If you're going to recommend parsing `ip`, the -j option may be more amenable to scripting. (JSON output) On 15/02/2019 15:52, David Wright wrote: On Fri 15 Feb 2019 at 12:02:20 (+0100), Markus

Re: get my ip address

2019-02-15 Thread David Wright
On Fri 15 Feb 2019 at 22:04:42 (+), Darac Marjal wrote: > If you're going to recommend parsing `ip`, the -j option may be more > amenable to scripting. (JSON output) > > On 15/02/2019 15:52, David Wright wrote: > > On Fri 15 Feb 2019 at 12:02:20 (+0100), Markus Schönhaber wrote: > >> Tony, 15.

Re: get my ip address

2019-02-15 Thread Darac Marjal
If you're going to recommend parsing `ip`, the -j option may be more amenable to scripting. (JSON output) On 15/02/2019 15:52, David Wright wrote: > On Fri 15 Feb 2019 at 12:02:20 (+0100), Markus Schönhaber wrote: >> Tony, 15.2.2019, 11:11:29 +0100: >> >>> Debian 9. I need to read my IPv6 address

Re: get my ip address

2019-02-15 Thread David Wright
On Fri 15 Feb 2019 at 12:02:20 (+0100), Markus Schönhaber wrote: > Tony, 15.2.2019, 11:11:29 +0100: > > > Debian 9. I need to read my IPv6 address into a python script. > > > > I am aware that I can call ip a and parse the result. The parsing, > > whilst quite achievable, is slightly tricky, but

Re: get my ip address

2019-02-15 Thread Markus Schönhaber
Tony, 15.2.2019, 11:11:29 +0100: > Debian 9. I need to read my IPv6 address into a python script. > > 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 wa

Re: get my ip address

2019-02-15 Thread tomas
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 p

get my ip address

2019-02-15 Thread tony
Hi all, Debian 9. I need to read my IPv6 address into a python script. 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?