source: trunk/packages/python-pydhcplib/examples/ipv4_example.py @ 2585

Last change on this file since 2585 was 1191, checked in by broder, 16 years ago

Strip the sipb-xen prefix from packages we didn't write

  • Property svn:executable set to *
File size: 504 bytes
Line 
1#!/usr/bin/python
2
3
4from pydhcplib.type_ipv4 import ipv4
5
6
7address = ipv4()
8print "a0 : ",address
9
10address1 = ipv4("192.168.0.1")
11print "a1 : ",address1
12
13address2 = ipv4("10.0.0.1")
14print "a2 : ",address2
15
16address3 = ipv4([192,168,0,1])
17print "a3 : ",address3
18
19
20
21if address1 == address2 : print "test 1 : ",address1, "==",address2
22else : print "test 1 : " ,address1, "!=",address2
23
24if address1 == address3 : print "test 2 : ", address1, "==",address3
25else : print "test 2 : ", address1, "!=",address3
26
27
28
Note: See TracBrowser for help on using the repository browser.