Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #80750
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Michael Ströder <michael@stroeder.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: netaddr value back to IP |
| Date | Fri, 14 Nov 2014 10:03:40 +0100 |
| Organization | A noiseless patient Spider |
| Lines | 19 |
| Message-ID | <m44gh0$er$1@dont-email.me> (permalink) |
| References | <mailman.15782.1415896539.18130.python-list@python.org> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Fri, 14 Nov 2014 09:03:28 +0000 (UTC) |
| Injection-Info | mx02.eternal-september.org; posting-host="14a1836b1363d79932e9e48eabd60200"; logging-data="475"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+uKMWazFBrBDToHVi3zNpkOGhDHhpvWDs=" |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0 SeaMonkey/2.26.1 |
| In-Reply-To | <mailman.15782.1415896539.18130.python-list@python.org> |
| Cancel-Lock | sha1:LVzeWQcQgTUMX30d/V586d6qwQg= |
| Xref | csiph.com comp.lang.python:80750 |
Show key headers only | View raw
Noah wrote:
> I am trying to get a value back to IP using the netaddr python module.
> How do I get the value 'ip' back to IP format? how is it done?
>
> ---- snip ----
>
> print IPNetwork(v4_peer_ip).value
> ip = IPNetwork(v4_peer_ip).value + 1
> print ip
>
> --- snip ---
>>> ip=netaddr.IPAddress('192.168.71.20')
>>> ip+=1
>>> str(ip)
'192.168.71.21'
Ciao, Michael.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
netaddr value back to IP Noah <noah-list@enabled.com> - 2014-11-13 16:30 +0000 Re: netaddr value back to IP Michael Ströder <michael@stroeder.com> - 2014-11-14 10:03 +0100
csiph-web