timmerk / python-iptools Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/python-iptools
License: BSD 2-Clause "Simplified" License
Automatically exported from code.google.com/p/python-iptools
License: BSD 2-Clause "Simplified" License
It has been mentioned on
[http://stackoverflow.com/questions/1942160/python-3-create-a-list-of-possible-i
p-addresses-from-a-cidr-notation/1942178#1942178
stackoverflow] that it would be non-trivial to make iptools work with python3k.
Sounds like a challenge to me. :)
Original issue reported on code.google.com by casadebender
on 1 Jan 2010 at 6:14
I could make use of IpRange and IpRangeList having the __len__ attribute.
I've attached a diff, since the changes required were minimal.
Only the doctest is missing, since I don't know my way around that yet ;)
Let me know if you can use the changes I made.
Regards
Moritz
Original issue reported on code.google.com by [email protected]
on 24 Aug 2011 at 9:12
Attachments:
What steps will reproduce the problem?
1. Using an IP range with iptools.IpRangeList
2.
3.
What is the expected output? What do you see instead?
Well, I use __iter__ so it would be the IP addresses that are in that
range. I get an exception instead. Here is the output as shown in pythons
interactive mode. Same thing happens with 2.6.
>>> INTERNAL_IPS = iptools.IpRangeList('1.2.3.4',
('192.168.1.20','192.168.1.60'), '192.168.0.12/24')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File
"/usr/lib/python2.4/site-packages/iptools-0.2-py2.4.egg/iptools/__init__.py",
line 490, in __init__
self.ips = tuple(map(IpRange, args))
File
"/usr/lib/python2.4/site-packages/iptools-0.2-py2.4.egg/iptools/__init__.py",
line 376, in __init__
if validate_cidr(start):
File
"/usr/lib/python2.4/site-packages/iptools-0.2-py2.4.egg/iptools/__init__.py",
line 156, in validate_cidr
if _CIDR_RE.match(s):
TypeError: expected string or buffer
The example on the page also fails:
http://code.google.com/p/python-iptools/wiki/DjangoSettings
What version of the product are you using? On what operating system?
I'm not sure but I think you mean iptools, and that's version 0.2. I'm
using python 2.4.3 and python 2.6.1 on CentOS 5 x86.
Please provide any additional information below.
I hope thats enough. I do have a request, perhaps see if this can be part
of the standard python library? It would be nice.
Thanks!
Original issue reported on code.google.com by [email protected]
on 2 Jan 2010 at 4:48
In attch is the patch for python 2.3 support, basically (type for) replace
by map and L on longs.
R
Original issue reported on code.google.com by [email protected]
on 5 Mar 2009 at 9:35
Attachments:
What steps will reproduce the problem?
1. long2ip(-1)
2. long2ip(374297346592387463875L)
3.
What is the expected output? What do you see instead?
expected: TypeError exception "out of range"
got: 1. '255.255.255.255' 2. '10.133.122.195'
What version of the product are you using? On what operating system?
Windows XP
python 2.6.4
Please provide any additional information below.
iptools.__init__.py:229
if _MAX_IP < l < 0:
raise ...
I suppose there should be:
if _MAX_IP < l or l < 0:
Original issue reported on code.google.com by [email protected]
on 16 May 2010 at 6:22
As the python documentation describes, some platforms do not support long
int for xrange arguments.
Running the example code from the wiki results in "OverflowError: long int
too large to convert to int" on OS X 10.5.8 on intel mac with the default
system 2.5 python.
I have attached a patch that should work as an alternative. No claim to the
validity or accuracy of the patch.
Original issue reported on code.google.com by [email protected]
on 2 Nov 2009 at 10:17
Attachments:
Is IPv6 in IPTools roadmap? Thanks!
Original issue reported on code.google.com by fran.net
on 13 Nov 2011 at 9:00
Hi,
I have various performance and class layout improvements which will massively
benefit the project (albeit, most are backwards incompatible).
Would you have any objections to me forking this project as python-iptools2 to
github??
Thanks
Cal
Original issue reported on code.google.com by [email protected]
on 9 May 2012 at 6:48
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.