source: branches/wsgi/packages/sipb-xen-python-pydhcplib/examples/ipv4_example.py @ 669

Last change on this file since 669 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
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.