Last change
on this file since 2995 was
361,
checked in by broder, 17 years ago
|
Splitting pydhcplib off into its own package
Hold onto your hats, folks - this could get messy
|
-
Property svn:executable set to
*
|
File size:
504 bytes
|
Line | |
---|
1 | #!/usr/bin/python |
---|
2 | |
---|
3 | |
---|
4 | from pydhcplib.type_ipv4 import ipv4 |
---|
5 | |
---|
6 | |
---|
7 | address = ipv4() |
---|
8 | print "a0 : ",address |
---|
9 | |
---|
10 | address1 = ipv4("192.168.0.1") |
---|
11 | print "a1 : ",address1 |
---|
12 | |
---|
13 | address2 = ipv4("10.0.0.1") |
---|
14 | print "a2 : ",address2 |
---|
15 | |
---|
16 | address3 = ipv4([192,168,0,1]) |
---|
17 | print "a3 : ",address3 |
---|
18 | |
---|
19 | |
---|
20 | |
---|
21 | if address1 == address2 : print "test 1 : ",address1, "==",address2 |
---|
22 | else : print "test 1 : " ,address1, "!=",address2 |
---|
23 | |
---|
24 | if address1 == address3 : print "test 2 : ", address1, "==",address3 |
---|
25 | else : print "test 2 : ", address1, "!=",address3 |
---|
26 | |
---|
27 | |
---|
28 | |
---|
Note: See
TracBrowser
for help on using the repository browser.