title: Generating IP-Address Range
body: <p>I have a <code>dict{}</code> with ip-addresses, from and to IP.</p>
  <p>All are strings, I want to maintain first 3 bytes of IP, and generate last byte up until n.n.n.X all inclusive.
  However I cannot convert this string to an Int or Float number as multiple decimals exist. And should remain as string in <code>dict{}</code> as they are parsed instances from another class.</p>
  <p>Current method:</p>
  <pre><code>def ipSorting(self):
      for key in self.zIpRangeDictionary:
          zn = self.zIpRangeDictionary[key]
          print zn.get_zoneFromIp(), '---&gt;', zn.get_zoneToIp()
  </code></pre>
  <p>Current output:</p>
  <pre><code>192.168.1.1 ---&gt; 192.168.1.10
  192.168.2.1 ---&gt; 192.168.2.10
  192.168.3.1 ---&gt; 192.168.3.10
  192.168.4.1 ---&gt; 192.168.4.10
  192.168.5.1 ---&gt; 192.168.5.10
  </code></pre>
  <p>Required:</p>
  <pre><code>192.168.1.1
  192.168.1.2
  192.168.1.3
  192.168.1.4
  192.168.1.5
  192.168.1.6
  192.168.1.7
  192.168.1.8
  192.168.1.9
  192.168.1.10
  etc.
  </code></pre>
  <p>A breakdown of ip address is:</p>
  <pre><code>netByte1 = Word(nums) + fStop
  netByte2 = Word(nums) + fStop
  zoneByte = Word(nums)
  hostByte = fStop + Word(nums)
  
  
  ipAddr = Combine(netByte1 + netByte2 + zoneByte + hostByte)
  </code></pre>
  <p>So than when rule in parsing, and is successfully matched with input, it adds ipAddress1 and ipAddress2 into a dict, from which I further should generate all inclusive addresses.</p>
  <pre><code>zoneIpRule = zoneName + frm + ipAddr + to + ipAddr
     def zoneIpAction(s, loc, toks):
         zoneIpRange = ZoneIpRange(toks[0], toks[2], toks[4])
         self.ast.zIpRangeDictionary[toks[0]] = zoneIpRange
     zoneIpRule.setParseAction(zoneIpAction)
  </code></pre>
  <p>Method above stores ipAddress into <code>dict{}</code> as instances, for which I have written get methods to retrieve those addresses so I can reuse them and do something with them.</p>