IP Math anyone?

William Park parkw at better.net
Mon Feb 26 22:48:05 CET 2001


On Mon, Feb 26, 2001 at 09:12:06PM +0000, jay graves wrote:
> On Mon, 26 Feb 2001 12:59:03 -0800, Timothy Grant
> <tjg at exceptionalminds.com> wrote:
> >Hi all,
> >I checked Parnassus, but couldn't find anything, so I'll ask
> >here. Has anyone done anything with IP math (e.g.,
> >192.168.0.254 + 1 = 192.168.1.1).
> >-- 
> >Stand Fast,
> >    tjg.
> 
> how about:
> http://www.vex.net/parnassus/apyllo.py?i=35559588
> 
> i don't know if it overrides the arithmetic operators but it might be
> a good starting point for you.

'__add__' implements '+'.  But, my question is what happens if
    192.168.0.254 + 5
?

---William Park, Open Geometry Consulting




More information about the Python-list mailing list