Commit 6bcfa0b8 by William Tisäter

Update apidocs

parent b764b22e
pygeoip pygeoip-module.html
pygeoip.__package__ pygeoip-module.html#__package__
pygeoip.MMAP_CACHE pygeoip-module.html#MMAP_CACHE
pygeoip.STANDARD pygeoip-module.html#STANDARD
pygeoip.time_zone_by_country_and_region pygeoip.timezone-module.html#time_zone_by_country_and_region
pygeoip.MEMORY_CACHE pygeoip-module.html#MEMORY_CACHE
pygeoip.ip2long pygeoip.util-module.html#ip2long
pygeoip.__package__ pygeoip-module.html#__package__
pygeoip.const pygeoip.const-module.html
pygeoip.const.GEOIP_STANDARD pygeoip.const-module.html#GEOIP_STANDARD
pygeoip.const.COUNTRY_CODES3 pygeoip.const-module.html#COUNTRY_CODES3
......@@ -38,6 +42,10 @@ pygeoip.const.COUNTRY_CODES pygeoip.const-module.html#COUNTRY_CODES
pygeoip.const.GEOIP_MEMORY_CACHE pygeoip.const-module.html#GEOIP_MEMORY_CACHE
pygeoip.const.MEMORY_CACHE pygeoip.const-module.html#MEMORY_CACHE
pygeoip.const.MAX_RECORD_LENGTH pygeoip.const-module.html#MAX_RECORD_LENGTH
pygeoip.timezone pygeoip.timezone-module.html
pygeoip.timezone._country pygeoip.timezone-module.html#_country
pygeoip.timezone.time_zone_by_country_and_region pygeoip.timezone-module.html#time_zone_by_country_and_region
pygeoip.timezone.__package__ pygeoip.timezone-module.html#__package__
pygeoip.util pygeoip.util-module.html
pygeoip.util.ip2long pygeoip.util-module.html#ip2long
pygeoip.util.__package__ pygeoip.util-module.html#__package__
......@@ -48,10 +56,12 @@ pygeoip.GeoIP.record_by_name pygeoip.GeoIP-class.html#record_by_name
pygeoip.GeoIP._setup_segments pygeoip.GeoIP-class.html#_setup_segments
pygeoip.GeoIP._seek_country pygeoip.GeoIP-class.html#_seek_country
pygeoip.GeoIP.__init__ pygeoip.GeoIP-class.html#__init__
pygeoip.GeoIP.time_zone_by_name pygeoip.GeoIP-class.html#time_zone_by_name
pygeoip.GeoIP._get_region pygeoip.GeoIP-class.html#_get_region
pygeoip.GeoIP.country_code_by_name pygeoip.GeoIP-class.html#country_code_by_name
pygeoip.GeoIP._get_org pygeoip.GeoIP-class.html#_get_org
pygeoip.GeoIP._lookup_country_id pygeoip.GeoIP-class.html#_lookup_country_id
pygeoip.GeoIP._get_region pygeoip.GeoIP-class.html#_get_region
pygeoip.GeoIP.time_zone_by_addr pygeoip.GeoIP-class.html#time_zone_by_addr
pygeoip.GeoIP._get_record pygeoip.GeoIP-class.html#_get_record
pygeoip.GeoIP.org_by_addr pygeoip.GeoIP-class.html#org_by_addr
pygeoip.GeoIP.region_by_addr pygeoip.GeoIP-class.html#region_by_addr
......
......@@ -34,7 +34,7 @@
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://code.google.com/p/pygeoip/">pygeoip</a></th>
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
......@@ -116,14 +116,14 @@
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://code.google.com/p/pygeoip/">pygeoip</a></th>
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Thu Oct 14 13:02:47 2010
Generated by Epydoc 3.0.1 on Thu Sep 20 11:41:42 2012
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
......
......@@ -34,7 +34,7 @@
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://code.google.com/p/pygeoip/">pygeoip</a></th>
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
......@@ -249,14 +249,14 @@ page was last updated. </p>
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://code.google.com/p/pygeoip/">pygeoip</a></th>
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Thu Oct 14 13:02:47 2010
Generated by Epydoc 3.0.1 on Thu Sep 20 11:41:42 2012
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
......
......@@ -34,7 +34,7 @@
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://code.google.com/p/pygeoip/">pygeoip</a></th>
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
......@@ -78,7 +78,7 @@
Q
<a href="#R">R</a>
<a href="#S">S</a>
T
<a href="#T">T</a>
<a href="#U">U</a>
V
<a href="#W">W</a>
......@@ -211,16 +211,18 @@
<tr>
<td width="33%" class="link-index"><a href="pygeoip.const-module.html#MAX_ORG_RECORD_LENGTH">MAX_ORG_RECORD_LENGTH</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip.const-module.html">pygeoip.const</a>)</span></td>
<td width="33%" class="link-index"><a href="pygeoip.const-module.html#MEMORY_CACHE">MEMORY_CACHE</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip.const-module.html">pygeoip.const</a>)</span></td>
<td width="33%" class="link-index">&nbsp;</td>
<td width="33%" class="link-index"><a href="pygeoip-module.html#MEMORY_CACHE">MEMORY_CACHE</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip-module.html">pygeoip</a>)</span></td>
<td width="33%" class="link-index"><a href="pygeoip-module.html#MMAP_CACHE">MMAP_CACHE</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip-module.html">pygeoip</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="pygeoip.const-module.html#MAX_RECORD_LENGTH">MAX_RECORD_LENGTH</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip.const-module.html">pygeoip.const</a>)</span></td>
<td width="33%" class="link-index"><a href="pygeoip.const-module.html#MEMORY_CACHE">MEMORY_CACHE</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip.const-module.html">pygeoip.const</a>)</span></td>
<td width="33%" class="link-index"><a href="pygeoip.const-module.html#MMAP_CACHE">MMAP_CACHE</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip.const-module.html">pygeoip.const</a>)</span></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
</table>
</td></tr>
......@@ -296,16 +298,41 @@
<span class="index-where">(in&nbsp;<a href="pygeoip.const-module.html">pygeoip.const</a>)</span></td>
<td width="33%" class="link-index"><a href="pygeoip.const-module.html#STANDARD_RECORD_LENGTH">STANDARD_RECORD_LENGTH</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip.const-module.html">pygeoip.const</a>)</span></td>
<td width="33%" class="link-index"><a href="pygeoip.const-module.html#STATE_BEGIN_REV1">STATE_BEGIN_REV1</a><br />
<td width="33%" class="link-index"><a href="pygeoip.const-module.html#STRUCTURE_INFO_MAX_SIZE">STRUCTURE_INFO_MAX_SIZE</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip.const-module.html">pygeoip.const</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="pygeoip.const-module.html#STANDARD">STANDARD</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip.const-module.html">pygeoip.const</a>)</span></td>
<td width="33%" class="link-index"><a href="pygeoip-module.html#STANDARD">STANDARD</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip-module.html">pygeoip</a>)</span></td>
<td width="33%" class="link-index"><a href="pygeoip.const-module.html#STATE_BEGIN_REV0">STATE_BEGIN_REV0</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip.const-module.html">pygeoip.const</a>)</span></td>
<td width="33%" class="link-index"><a href="pygeoip.const-module.html#STRUCTURE_INFO_MAX_SIZE">STRUCTURE_INFO_MAX_SIZE</a><br />
<td width="33%" class="link-index">&nbsp;</td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="pygeoip.const-module.html#STANDARD">STANDARD</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip.const-module.html">pygeoip.const</a>)</span></td>
<td width="33%" class="link-index"><a href="pygeoip.const-module.html#STATE_BEGIN_REV1">STATE_BEGIN_REV1</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip.const-module.html">pygeoip.const</a>)</span></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
</table>
</td></tr>
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="T">T</a></h2></td>
<td valign="top">
<table class="link-index" width="100%" border="1">
<tr>
<td width="33%" class="link-index"><a href="pygeoip.GeoIP-class.html#time_zone_by_addr">time_zone_by_addr()</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip.GeoIP-class.html">GeoIP</a>)</span></td>
<td width="33%" class="link-index"><a href="pygeoip.GeoIP-class.html#time_zone_by_name">time_zone_by_name()</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip.GeoIP-class.html">GeoIP</a>)</span></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="pygeoip.timezone-module.html#time_zone_by_country_and_region">time_zone_by_country_and_region()</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip.timezone-module.html">pygeoip.timezone</a>)</span></td>
<td width="33%" class="link-index"><a href="pygeoip.timezone-module.html">timezone</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip-module.html">pygeoip</a>)</span></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
</table>
</td></tr>
......@@ -348,15 +375,15 @@
<tr>
<td width="33%" class="link-index"><a href="pygeoip.GeoIPMetaclass-class.html#__new__">__new__()</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip.GeoIPMetaclass-class.html">GeoIPMetaclass</a>)</span></td>
<td width="33%" class="link-index"><a href="pygeoip.GeoIP-class.html#_get_org">_get_org()</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip.GeoIP-class.html">GeoIP</a>)</span></td>
<td width="33%" class="link-index"><a href="pygeoip.timezone-module.html#_country">_country</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip.timezone-module.html">pygeoip.timezone</a>)</span></td>
<td width="33%" class="link-index"><a href="pygeoip.GeoIP-class.html#_lookup_country_id">_lookup_country_id()</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip.GeoIP-class.html">GeoIP</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="pygeoip-module.html#__package__">__package__</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip-module.html">pygeoip</a>)</span></td>
<td width="33%" class="link-index"><a href="pygeoip.GeoIP-class.html#_get_record">_get_record()</a><br />
<td width="33%" class="link-index"><a href="pygeoip.GeoIP-class.html#_get_org">_get_org()</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip.GeoIP-class.html">GeoIP</a>)</span></td>
<td width="33%" class="link-index"><a href="pygeoip.GeoIP-class.html#_seek_country">_seek_country()</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip.GeoIP-class.html">GeoIP</a>)</span></td>
......@@ -364,11 +391,18 @@
<tr>
<td width="33%" class="link-index"><a href="pygeoip.const-module.html#__package__">__package__</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip.const-module.html">pygeoip.const</a>)</span></td>
<td width="33%" class="link-index"><a href="pygeoip.GeoIP-class.html#_get_region">_get_region()</a><br />
<td width="33%" class="link-index"><a href="pygeoip.GeoIP-class.html#_get_record">_get_record()</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip.GeoIP-class.html">GeoIP</a>)</span></td>
<td width="33%" class="link-index"><a href="pygeoip.GeoIP-class.html#_setup_segments">_setup_segments()</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip.GeoIP-class.html">GeoIP</a>)</span></td>
</tr>
<tr>
<td width="33%" class="link-index"><a href="pygeoip.timezone-module.html#__package__">__package__</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip.timezone-module.html">pygeoip.timezone</a>)</span></td>
<td width="33%" class="link-index"><a href="pygeoip.GeoIP-class.html#_get_region">_get_region()</a><br />
<span class="index-where">(in&nbsp;<a href="pygeoip.GeoIP-class.html">GeoIP</a>)</span></td>
<td width="33%" class="link-index">&nbsp;</td>
</tr>
</table>
</td></tr>
</table>
......@@ -396,14 +430,14 @@
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://code.google.com/p/pygeoip/">pygeoip</a></th>
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Thu Oct 14 13:02:47 2010
Generated by Epydoc 3.0.1 on Thu Sep 20 11:41:42 2012
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
......
......@@ -34,7 +34,7 @@
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://code.google.com/p/pygeoip/">pygeoip</a></th>
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
......@@ -63,6 +63,7 @@
<li> <strong class="uidlink"><a href="pygeoip-module.html">pygeoip</a></strong>: <em class="summary">Pure Python GeoIP API.</em>
<ul>
<li> <strong class="uidlink"><a href="pygeoip.const-module.html">pygeoip.const</a></strong>: <em class="summary">Constants needed for parsing binary GeoIP databases.</em> </li>
<li> <strong class="uidlink"><a href="pygeoip.timezone-module.html">pygeoip.timezone</a></strong> </li>
<li> <strong class="uidlink"><a href="pygeoip.util-module.html">pygeoip.util</a></strong>: <em class="summary">Misc.</em> </li>
</ul>
</li>
......@@ -91,14 +92,14 @@
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://code.google.com/p/pygeoip/">pygeoip</a></th>
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Thu Oct 14 13:02:47 2010
Generated by Epydoc 3.0.1 on Thu Sep 20 11:41:42 2012
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
......
......@@ -34,7 +34,7 @@
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://code.google.com/p/pygeoip/">pygeoip</a></th>
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
......@@ -110,6 +110,7 @@
<tr><td class="summary">
<ul class="nomargin">
<li> <strong class="uidlink"><a href="pygeoip.const-module.html">pygeoip.const</a></strong>: <em class="summary">Constants needed for parsing binary GeoIP databases.</em> </li>
<li> <strong class="uidlink"><a href="pygeoip.timezone-module.html">pygeoip.timezone</a></strong> </li>
<li> <strong class="uidlink"><a href="pygeoip.util-module.html">pygeoip.util</a></strong>: <em class="summary">Misc.</em> </li>
</ul></td></tr>
</table>
......@@ -182,6 +183,27 @@
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="MMAP_CACHE"></a><span class="summary-name">MMAP_CACHE</span> = <code title="8">8</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="MEMORY_CACHE"></a><span class="summary-name">MEMORY_CACHE</span> = <code title="1">1</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="STANDARD"></a><span class="summary-name">STANDARD</span> = <code title="0">0</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="__package__"></a><span class="summary-name">__package__</span> = <code title="'pygeoip'"><code class="variable-quote">'</code><code class="variable-string">pygeoip</code><code class="variable-quote">'</code></code>
</td>
</tr>
......@@ -210,14 +232,14 @@
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://code.google.com/p/pygeoip/">pygeoip</a></th>
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Thu Oct 14 13:02:47 2010
Generated by Epydoc 3.0.1 on Thu Sep 20 11:41:42 2012
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -34,7 +34,7 @@
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://code.google.com/p/pygeoip/">pygeoip</a></th>
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
......@@ -397,6 +397,42 @@ object --+
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">str</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="pygeoip.GeoIP-class.html#time_zone_by_addr" class="summary-sig-name">time_zone_by_addr</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">addr</span>)</span><br />
Look up the time zone for a given IP address.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pygeoip-pysrc.html#GeoIP.time_zone_by_addr">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">str</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="pygeoip.GeoIP-class.html#time_zone_by_name" class="summary-sig-name">time_zone_by_name</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">hostname</span>)</span><br />
Look up the time zone for a given hostname.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pygeoip-pysrc.html#GeoIP.time_zone_by_name">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
......@@ -480,9 +516,12 @@ object --+
<dl class="fields">
<dt>Parameters:</dt>
<dd><ul class="nomargin-top">
<li><strong class="pname"><code>filename</code></strong> (str) - path to a geoip database</li>
<li><strong class="pname"><code>filename</code></strong> (str) - path to a geoip database. If MEMORY_CACHE is used, the file can
be gzipped.</li>
<li><strong class="pname"><code>flags</code></strong> (int) - flags that affect how the database is processed. Currently the
only supported flags are STANDARD, MEMORY_CACHE, and MMAP_CACHE.</li>
only supported flags are STANDARD (the default), MEMORY_CACHE
(preload the whole file into memory), and MMAP_CACHE (access the
file via mmap).</li>
</ul></dd>
<dt>Overrides:
object.__init__
......@@ -901,6 +940,60 @@ object --+
</dl>
</td></tr></table>
</div>
<a name="time_zone_by_addr"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">time_zone_by_addr</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">addr</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="pygeoip-pysrc.html#GeoIP.time_zone_by_addr">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Look up the time zone for a given IP address. Use this method if you
have a Region or City database.</p>
<dl class="fields">
<dt>Parameters:</dt>
<dd><ul class="nomargin-top">
<li><strong class="pname"><code>addr</code></strong> (str) - IP address</li>
</ul></dd>
<dt>Returns: str</dt>
<dd>Time zone</dd>
</dl>
</td></tr></table>
</div>
<a name="time_zone_by_name"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">time_zone_by_name</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">hostname</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="pygeoip-pysrc.html#GeoIP.time_zone_by_name">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Look up the time zone for a given hostname. Use this method if you
have a Region or City database.</p>
<dl class="fields">
<dt>Parameters:</dt>
<dd><ul class="nomargin-top">
<li><strong class="pname"><code>hostname</code></strong> (str) - host name</li>
</ul></dd>
<dt>Returns: str</dt>
<dd>Time zone</dd>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
......@@ -926,14 +1019,14 @@ object --+
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://code.google.com/p/pygeoip/">pygeoip</a></th>
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Thu Oct 14 13:02:47 2010
Generated by Epydoc 3.0.1 on Thu Sep 20 11:41:42 2012
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
......
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>pygeoip.GeoIPBase</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="pygeoip-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="pygeoip-module.html">Package&nbsp;pygeoip</a> ::
Class&nbsp;GeoIPBase
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="pygeoip.GeoIPBase-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class GeoIPBase</h1><p class="nomargin-top"><span class="codelink"><a href="pygeoip-pysrc.html#GeoIPBase">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
<strong class="uidshort">GeoIPBase</strong>
</pre>
<dl><dt>Known Subclasses:</dt>
<dd>
<ul class="subclass-list">
<li><a href="pygeoip.GeoIP-class.html">GeoIP</a></li> </ul>
</dd></dl>
<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__format__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__init__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>,
<code>__sizeof__</code>,
<code>__str__</code>,
<code>__subclasshook__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="pygeoip-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Thu Sep 20 11:41:42 2012
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>
......@@ -34,7 +34,7 @@
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://code.google.com/p/pygeoip/">pygeoip</a></th>
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
......@@ -170,14 +170,14 @@ exceptions.BaseException --+
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://code.google.com/p/pygeoip/">pygeoip</a></th>
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Thu Oct 14 13:02:47 2010
Generated by Epydoc 3.0.1 on Thu Sep 20 11:41:42 2012
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
......
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>pygeoip.GeoIPMetaclass</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="pygeoip-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="pygeoip-module.html">Package&nbsp;pygeoip</a> ::
Class&nbsp;GeoIPMetaclass
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="pygeoip.GeoIPMetaclass-class.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== TYPE DESCRIPTION ==================== -->
<h1 class="epydoc">Type GeoIPMetaclass</h1><p class="nomargin-top"><span class="codelink"><a href="pygeoip-pysrc.html#GeoIPMetaclass">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
|
type --+
|
<strong class="uidshort">GeoIPMetaclass</strong>
</pre>
<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-InstanceMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>type</code></b>:
<code>__call__</code>,
<code>__delattr__</code>,
<code>__eq__</code>,
<code>__ge__</code>,
<code>__getattribute__</code>,
<code>__gt__</code>,
<code>__hash__</code>,
<code>__init__</code>,
<code>__le__</code>,
<code>__lt__</code>,
<code>__ne__</code>,
<code>__repr__</code>,
<code>__setattr__</code>,
<code>__subclasses__</code>,
<code>mro</code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__format__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__sizeof__</code>,
<code>__str__</code>,
<code>__subclasshook__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Static Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-StaticMethods"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">a new object with type S, a subtype of T</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="pygeoip.GeoIPMetaclass-class.html#__new__" class="summary-sig-name">__new__</a>(<span class="summary-sig-arg">cls</span>,
<span class="summary-sig-arg">*args</span>,
<span class="summary-sig-arg">**kwargs</span>)</span><br />
Singleton method to gets an instance without reparsing the db.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pygeoip-pysrc.html#GeoIPMetaclass.__new__">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Class Variables</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-ClassVariables"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="pygeoip.GeoIPMetaclass-class.html#_instances" class="summary-name" onclick="show_private();">_instances</a> = <code title="{'GeoIP': &lt;class 'pygeoip.GeoIP'&gt;,
'GeoIPBase': &lt;class 'pygeoip.GeoIPBase'&gt;}"><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">GeoIP</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;class 'pygeoip.GeoIP'&gt;<code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">GeoIPBase</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;<code class="variable-ellipsis">...</code></code>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>type</code></b>:
<code>__abstractmethods__</code>,
<code>__base__</code>,
<code>__bases__</code>,
<code>__basicsize__</code>,
<code>__dictoffset__</code>,
<code>__flags__</code>,
<code>__instancecheck__</code>,
<code>__itemsize__</code>,
<code>__mro__</code>,
<code>__name__</code>,
<code>__subclasscheck__</code>,
<code>__weakrefoffset__</code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-MethodDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="__new__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__new__</span>(<span class="sig-arg">cls</span>,
<span class="sig-arg">*args</span>,
<span class="sig-arg">**kwargs</span>)</span>
<br /><em class="fname">Static Method</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="pygeoip-pysrc.html#GeoIPMetaclass.__new__">source&nbsp;code</a></span>&nbsp;
</td>
</tr></table>
<p>Singleton method to gets an instance without reparsing the db. Unique
instances are instantiated based on the filename of the db. Flags are
ignored for this, i.e. if you initialize one with STANDARD flag (default)
and then try later to initialize with MEMORY_CACHE, it will still return
the STANDARD one.</p>
<dl class="fields">
<dt>Returns: a new object with type S, a subtype of T</dt>
<dt>Overrides:
object.__new__
</dt>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Class Variable Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-ClassVariableDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="_instances"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">_instances</h3>
<dl class="fields">
</dl>
<dl class="fields">
<dt>Value:</dt>
<dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">GeoIP</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;class 'pygeoip.GeoIP'&gt;<code class="variable-op">,</code>
<code class="variable-quote">'</code><code class="variable-string">GeoIPBase</code><code class="variable-quote">'</code><code class="variable-op">: </code>&lt;class 'pygeoip.GeoIPBase'&gt;<code class="variable-group">}</code>
</pre></td></tr></table>
</dd>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="pygeoip-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Thu Sep 20 11:41:42 2012
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>
......@@ -34,7 +34,7 @@
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://code.google.com/p/pygeoip/">pygeoip</a></th>
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
......@@ -531,14 +531,14 @@
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://code.google.com/p/pygeoip/">pygeoip</a></th>
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Thu Oct 14 13:02:47 2010
Generated by Epydoc 3.0.1 on Thu Sep 20 11:41:42 2012
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
......
......@@ -34,7 +34,7 @@
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://code.google.com/p/pygeoip/">pygeoip</a></th>
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
......@@ -405,9 +405,12 @@
<a name="L342"></a><tt class="py-lineno">342</tt> <tt class="py-line"> <tt class="py-op">)</tt> </tt>
<a name="L343"></a><tt class="py-lineno">343</tt> <tt class="py-line"> </tt>
<a name="L344"></a><tt class="py-lineno">344</tt> <tt class="py-line"><tt class="py-comment"># storage / caching flags</tt> </tt>
<a name="L345"></a><tt class="py-lineno">345</tt> <tt class="py-line"><tt id="link-6" class="py-name" targets="Variable pygeoip.const.STANDARD=pygeoip.const-module.html#STANDARD"><a title="pygeoip.const.STANDARD" class="py-name" href="#" onclick="return doclink('link-6', 'STANDARD', 'link-6');">STANDARD</a></tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L346"></a><tt class="py-lineno">346</tt> <tt class="py-line"><tt id="link-7" class="py-name" targets="Variable pygeoip.const.MEMORY_CACHE=pygeoip.const-module.html#MEMORY_CACHE"><a title="pygeoip.const.MEMORY_CACHE" class="py-name" href="#" onclick="return doclink('link-7', 'MEMORY_CACHE', 'link-7');">MEMORY_CACHE</a></tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt>
<a name="L347"></a><tt class="py-lineno">347</tt> <tt class="py-line"><tt id="link-8" class="py-name" targets="Variable pygeoip.const.MMAP_CACHE=pygeoip.const-module.html#MMAP_CACHE"><a title="pygeoip.const.MMAP_CACHE" class="py-name" href="#" onclick="return doclink('link-8', 'MMAP_CACHE', 'link-8');">MMAP_CACHE</a></tt> <tt class="py-op">=</tt> <tt class="py-number">8</tt> </tt>
<a name="L345"></a><tt class="py-lineno">345</tt> <tt class="py-line"><tt id="link-6" class="py-name" targets="Variable pygeoip.STANDARD=pygeoip-module.html#STANDARD,Variable pygeoip.const.STANDARD=pygeoip.const-module.html#STANDARD"><a title="pygeoip.STANDARD
pygeoip.const.STANDARD" class="py-name" href="#" onclick="return doclink('link-6', 'STANDARD', 'link-6');">STANDARD</a></tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L346"></a><tt class="py-lineno">346</tt> <tt class="py-line"><tt id="link-7" class="py-name" targets="Variable pygeoip.MEMORY_CACHE=pygeoip-module.html#MEMORY_CACHE,Variable pygeoip.const.MEMORY_CACHE=pygeoip.const-module.html#MEMORY_CACHE"><a title="pygeoip.MEMORY_CACHE
pygeoip.const.MEMORY_CACHE" class="py-name" href="#" onclick="return doclink('link-7', 'MEMORY_CACHE', 'link-7');">MEMORY_CACHE</a></tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt>
<a name="L347"></a><tt class="py-lineno">347</tt> <tt class="py-line"><tt id="link-8" class="py-name" targets="Variable pygeoip.MMAP_CACHE=pygeoip-module.html#MMAP_CACHE,Variable pygeoip.const.MMAP_CACHE=pygeoip.const-module.html#MMAP_CACHE"><a title="pygeoip.MMAP_CACHE
pygeoip.const.MMAP_CACHE" class="py-name" href="#" onclick="return doclink('link-8', 'MMAP_CACHE', 'link-8');">MMAP_CACHE</a></tt> <tt class="py-op">=</tt> <tt class="py-number">8</tt> </tt>
<a name="L348"></a><tt class="py-lineno">348</tt> <tt class="py-line"> </tt>
<a name="L349"></a><tt class="py-lineno">349</tt> <tt class="py-line"><tt class="py-comment"># Database structure constants</tt> </tt>
<a name="L350"></a><tt class="py-lineno">350</tt> <tt class="py-line"><tt id="link-9" class="py-name" targets="Variable pygeoip.const.COUNTRY_BEGIN=pygeoip.const-module.html#COUNTRY_BEGIN"><a title="pygeoip.const.COUNTRY_BEGIN" class="py-name" href="#" onclick="return doclink('link-9', 'COUNTRY_BEGIN', 'link-9');">COUNTRY_BEGIN</a></tt> <tt class="py-op">=</tt> <tt class="py-number">16776960</tt> </tt>
......@@ -472,14 +475,14 @@ expandto(location.href);
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://code.google.com/p/pygeoip/">pygeoip</a></th>
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Thu Oct 14 13:02:47 2010
Generated by Epydoc 3.0.1 on Thu Sep 20 11:41:42 2012
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
......
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>pygeoip.timezone</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="pygeoip-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="pygeoip-module.html">Package&nbsp;pygeoip</a> ::
Module&nbsp;timezone
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="pygeoip.timezone-module.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module timezone</h1><p class="nomargin-top"><span class="codelink"><a href="pygeoip.timezone-pysrc.html">source&nbsp;code</a></span></p>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Functions</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Functions"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="time_zone_by_country_and_region"></a><span class="summary-sig-name">time_zone_by_country_and_region</span>(<span class="summary-sig-arg">country_code</span>,
<span class="summary-sig-arg">region_name</span>=<span class="summary-sig-default">None</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="pygeoip.timezone-pysrc.html#time_zone_by_country_and_region">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Variables</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Variables"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="pygeoip.timezone-module.html#_country" class="summary-name" onclick="show_private();">_country</a> = <code title="{'AD': 'Europe/Andorra',
'AE': 'Asia/Dubai',
'AF': 'Asia/Kabul',
'AG': 'America/Antigua',
'AI': 'America/Anguilla',
'AL': 'Europe/Tirane',
'AM': 'Asia/Yerevan',
'AO': 'Africa/Luanda',
..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">AD</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">Europe/Andorra</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">AE</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">Asia/Dubai</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">AF</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-ellipsis">...</code></code>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="__package__"></a><span class="summary-name">__package__</span> = <code title="None">None</code>
</td>
</tr>
</table>
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Variables Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-VariablesDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="_country"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">_country</h3>
<dl class="fields">
</dl>
<dl class="fields">
<dt>Value:</dt>
<dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">AD</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">Europe/Andorra</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-quote">'</code><code class="variable-string">AE</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">Asia/Dubai</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-quote">'</code><code class="variable-string">AF</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">Asia/Kabul</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-quote">'</code><code class="variable-string">AG</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">America/Antigua</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-quote">'</code><code class="variable-string">AI</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">America/Anguilla</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-quote">'</code><code class="variable-string">AL</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">Europe/Tirane</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-quote">'</code><code class="variable-string">AM</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">Asia/Yerevan</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-quote">'</code><code class="variable-string">AO</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">Africa/Luanda</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="pygeoip-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Thu Sep 20 11:41:42 2012
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -34,7 +34,7 @@
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://code.google.com/p/pygeoip/">pygeoip</a></th>
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
......@@ -137,7 +137,7 @@
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="__package__"></a><span class="summary-name">__package__</span> = <code title="None">None</code>
<a name="__package__"></a><span class="summary-name">__package__</span> = <code title="'pygeoip'"><code class="variable-quote">'</code><code class="variable-string">pygeoip</code><code class="variable-quote">'</code></code>
</td>
</tr>
</table>
......@@ -209,14 +209,14 @@
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://code.google.com/p/pygeoip/">pygeoip</a></th>
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Thu Oct 14 13:02:47 2010
Generated by Epydoc 3.0.1 on Thu Sep 20 11:41:42 2012
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
......
......@@ -34,7 +34,7 @@
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://code.google.com/p/pygeoip/">pygeoip</a></th>
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
......@@ -83,19 +83,26 @@
<a name="L20"></a><tt class="py-lineno">20</tt> <tt class="py-line"><tt class="py-docstring">along with this program. If not, see &lt;http://www.gnu.org/licenses/lgpl.txt&gt;.</tt> </tt>
<a name="L21"></a><tt class="py-lineno">21</tt> <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L22"></a><tt class="py-lineno">22</tt> <tt class="py-line"> </tt>
<a name="ip2long"></a><div id="ip2long-def"><a name="L23"></a><tt class="py-lineno">23</tt> <a class="py-toggle" href="#" id="ip2long-toggle" onclick="return toggle('ip2long');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pygeoip.util-module.html#ip2long">ip2long</a><tt class="py-op">(</tt><tt class="py-param">ip</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ip2long-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="ip2long-expanded"><a name="L24"></a><tt class="py-lineno">24</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L25"></a><tt class="py-lineno">25</tt> <tt class="py-line"><tt class="py-docstring"> Convert a IPv4 address into a 32-bit integer.</tt> </tt>
<a name="L26"></a><tt class="py-lineno">26</tt> <tt class="py-line"><tt class="py-docstring"> </tt> </tt>
<a name="L27"></a><tt class="py-lineno">27</tt> <tt class="py-line"><tt class="py-docstring"> @param ip: quad-dotted IPv4 address</tt> </tt>
<a name="L28"></a><tt class="py-lineno">28</tt> <tt class="py-line"><tt class="py-docstring"> @type ip: str</tt> </tt>
<a name="L29"></a><tt class="py-lineno">29</tt> <tt class="py-line"><tt class="py-docstring"> @return: network byte order 32-bit integer</tt> </tt>
<a name="L30"></a><tt class="py-lineno">30</tt> <tt class="py-line"><tt class="py-docstring"> @rtype: int</tt> </tt>
<a name="L31"></a><tt class="py-lineno">31</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L32"></a><tt class="py-lineno">32</tt> <tt class="py-line"> <tt class="py-name">ip_array</tt> <tt class="py-op">=</tt> <tt class="py-name">ip</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt> </tt>
<a name="L33"></a><tt class="py-lineno">33</tt> <tt class="py-line"> <tt class="py-name">ip_long</tt> <tt class="py-op">=</tt> <tt class="py-name">long</tt><tt class="py-op">(</tt><tt class="py-name">ip_array</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-op">*</tt> <tt class="py-number">16777216</tt> <tt class="py-op">+</tt> <tt class="py-name">long</tt><tt class="py-op">(</tt><tt class="py-name">ip_array</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-op">*</tt> <tt class="py-number">65536</tt> <tt class="py-op">+</tt> <tt class="py-name">long</tt><tt class="py-op">(</tt><tt class="py-name">ip_array</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-op">*</tt> <tt class="py-number">256</tt> <tt class="py-op">+</tt> <tt class="py-name">long</tt><tt class="py-op">(</tt><tt class="py-name">ip_array</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L34"></a><tt class="py-lineno">34</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">ip_long</tt> </tt>
</div><a name="L35"></a><tt class="py-lineno">35</tt> <tt class="py-line"> </tt><script type="text/javascript">
<a name="L23"></a><tt class="py-lineno">23</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">six</tt> </tt>
<a name="L24"></a><tt class="py-lineno">24</tt> <tt class="py-line"> </tt>
<a name="ip2long"></a><div id="ip2long-def"><a name="L25"></a><tt class="py-lineno">25</tt> <a class="py-toggle" href="#" id="ip2long-toggle" onclick="return toggle('ip2long');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pygeoip.util-module.html#ip2long">ip2long</a><tt class="py-op">(</tt><tt class="py-param">ip</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ip2long-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="ip2long-expanded"><a name="L26"></a><tt class="py-lineno">26</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
<a name="L27"></a><tt class="py-lineno">27</tt> <tt class="py-line"><tt class="py-docstring"> Convert a IPv4 address into a 32-bit integer.</tt> </tt>
<a name="L28"></a><tt class="py-lineno">28</tt> <tt class="py-line"><tt class="py-docstring"> </tt> </tt>
<a name="L29"></a><tt class="py-lineno">29</tt> <tt class="py-line"><tt class="py-docstring"> @param ip: quad-dotted IPv4 address</tt> </tt>
<a name="L30"></a><tt class="py-lineno">30</tt> <tt class="py-line"><tt class="py-docstring"> @type ip: str</tt> </tt>
<a name="L31"></a><tt class="py-lineno">31</tt> <tt class="py-line"><tt class="py-docstring"> @return: network byte order 32-bit integer</tt> </tt>
<a name="L32"></a><tt class="py-lineno">32</tt> <tt class="py-line"><tt class="py-docstring"> @rtype: int</tt> </tt>
<a name="L33"></a><tt class="py-lineno">33</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L34"></a><tt class="py-lineno">34</tt> <tt class="py-line"> <tt class="py-name">ip_array</tt> <tt class="py-op">=</tt> <tt class="py-name">ip</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt> </tt>
<a name="L35"></a><tt class="py-lineno">35</tt> <tt class="py-line"> </tt>
<a name="L36"></a><tt class="py-lineno">36</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">six</tt><tt class="py-op">.</tt><tt class="py-name">PY3</tt><tt class="py-op">:</tt> </tt>
<a name="L37"></a><tt class="py-lineno">37</tt> <tt class="py-line"> <tt class="py-comment"># int and long are unified in py3</tt> </tt>
<a name="L38"></a><tt class="py-lineno">38</tt> <tt class="py-line"> <tt class="py-name">ip_long</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">ip_array</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-op">*</tt> <tt class="py-number">16777216</tt> <tt class="py-op">+</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">ip_array</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-op">*</tt> <tt class="py-number">65536</tt> <tt class="py-op">+</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">ip_array</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-op">*</tt> <tt class="py-number">256</tt> <tt class="py-op">+</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">ip_array</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L39"></a><tt class="py-lineno">39</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L40"></a><tt class="py-lineno">40</tt> <tt class="py-line"> <tt class="py-name">ip_long</tt> <tt class="py-op">=</tt> <tt class="py-name">long</tt><tt class="py-op">(</tt><tt class="py-name">ip_array</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-op">*</tt> <tt class="py-number">16777216</tt> <tt class="py-op">+</tt> <tt class="py-name">long</tt><tt class="py-op">(</tt><tt class="py-name">ip_array</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-op">*</tt> <tt class="py-number">65536</tt> <tt class="py-op">+</tt> <tt class="py-name">long</tt><tt class="py-op">(</tt><tt class="py-name">ip_array</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-op">*</tt> <tt class="py-number">256</tt> <tt class="py-op">+</tt> <tt class="py-name">long</tt><tt class="py-op">(</tt><tt class="py-name">ip_array</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L41"></a><tt class="py-lineno">41</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">ip_long</tt> </tt>
</div><a name="L42"></a><tt class="py-lineno">42</tt> <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
......@@ -126,14 +133,14 @@ expandto(location.href);
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://code.google.com/p/pygeoip/">pygeoip</a></th>
><a class="navbar" target="_top" href="https://github.com/appliedsec/pygeoip">pygeoip</a></th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Thu Oct 14 13:02:47 2010
Generated by Epydoc 3.0.1 on Thu Sep 20 11:41:42 2012
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
......
......@@ -7,7 +7,7 @@
<body>
<script type="text/javascript">
<!--
var pages = ["pygeoip.GeoIPMetaclass-c", "pygeoip.GeoIPError-c", "pygeoip.GeoIPBase-c", "pygeoip.const-m", "pygeoip.GeoIP-c", "pygeoip.util-m", "pygeoip-m"];
var pages = ["pygeoip.GeoIPMetaclass-c", "pygeoip.GeoIPError-c", "pygeoip.GeoIPBase-c", "pygeoip.timezone-m", "pygeoip.const-m", "pygeoip.GeoIP-c", "pygeoip.util-m", "pygeoip-m"];
var dottedName = get_anchor();
if (dottedName) {
var target = redirect_url(dottedName);
......
......@@ -18,9 +18,13 @@
>pygeoip.GeoIPBase</a><br /> <a target="mainFrame" href="pygeoip.GeoIPError-class.html"
>pygeoip.GeoIPError</a><br /> <a target="mainFrame" href="pygeoip.GeoIPMetaclass-class.html"
>pygeoip.GeoIPMetaclass</a><br /> <h2 class="toc">All Functions</h2>
<a target="mainFrame" href="pygeoip.util-module.html#ip2long"
<a target="mainFrame" href="pygeoip.timezone-module.html#time_zone_by_country_and_region"
>pygeoip.timezone.time_zone_by_country_and_region</a><br /> <a target="mainFrame" href="pygeoip.util-module.html#ip2long"
>pygeoip.util.ip2long</a><br /> <h2 class="toc">All Variables</h2>
<a target="mainFrame" href="pygeoip-module.html#__package__"
<a target="mainFrame" href="pygeoip-module.html#MEMORY_CACHE"
>pygeoip.MEMORY_CACHE</a><br /> <a target="mainFrame" href="pygeoip-module.html#MMAP_CACHE"
>pygeoip.MMAP_CACHE</a><br /> <a target="mainFrame" href="pygeoip-module.html#STANDARD"
>pygeoip.STANDARD</a><br /> <a target="mainFrame" href="pygeoip-module.html#__package__"
>pygeoip.__package__</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#ASNUM_EDITION"
>pygeoip.const.ASNUM_EDITION</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#CANADA_OFFSET"
>pygeoip.const.CANADA_OFFSET</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#CITY_EDITION_REV0"
......@@ -57,7 +61,13 @@
>pygeoip.const.STRUCTURE_INFO_MAX_SIZE</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#US_OFFSET"
>pygeoip.const.US_OFFSET</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#WORLD_OFFSET"
>pygeoip.const.WORLD_OFFSET</a><br /> <a target="mainFrame" href="pygeoip.const-module.html#__package__"
>pygeoip.const.__package__</a><br /> <a target="mainFrame" href="pygeoip.util-module.html#__package__"
>pygeoip.const.__package__</a><br /> <div class="private">
<a target="mainFrame" href="pygeoip.timezone-module.html#__package__"
>pygeoip.timezone.__package__</a><br /> </div>
<div class="private">
<a target="mainFrame" href="pygeoip.timezone-module.html#_country"
>pygeoip.timezone._country</a><br /> </div>
<a target="mainFrame" href="pygeoip.util-module.html#__package__"
>pygeoip.util.__package__</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span>
......
......@@ -18,7 +18,10 @@
>GeoIPBase</a><br /> <a target="mainFrame" href="pygeoip.GeoIPError-class.html"
>GeoIPError</a><br /> <a target="mainFrame" href="pygeoip.GeoIPMetaclass-class.html"
>GeoIPMetaclass</a><br /> <h2 class="toc">Variables</h2>
<a target="mainFrame" href="pygeoip-module.html#__package__"
<a target="mainFrame" href="pygeoip-module.html#MEMORY_CACHE"
>MEMORY_CACHE</a><br /> <a target="mainFrame" href="pygeoip-module.html#MMAP_CACHE"
>MMAP_CACHE</a><br /> <a target="mainFrame" href="pygeoip-module.html#STANDARD"
>STANDARD</a><br /> <a target="mainFrame" href="pygeoip-module.html#__package__"
>__package__</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span>
......
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>timezone</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<h1 class="toc">Module timezone</h1>
<hr />
<h2 class="toc">Functions</h2>
<a target="mainFrame" href="pygeoip.timezone-module.html#time_zone_by_country_and_region"
>time_zone_by_country_and_region</a><br /> <h2 class="toc">Variables</h2>
<div class="private">
<a target="mainFrame" href="pygeoip.timezone-module.html#__package__"
>__package__</a><br /> </div>
<div class="private">
<a target="mainFrame" href="pygeoip.timezone-module.html#_country"
>_country</a><br /> </div>
<hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>
......@@ -17,7 +17,8 @@
<h2 class="toc">Modules</h2>
<a target="moduleFrame" href="toc-pygeoip-module.html"
onclick="setFrame('toc-pygeoip-module.html','pygeoip-module.html');" >pygeoip</a><br /> <a target="moduleFrame" href="toc-pygeoip.const-module.html"
onclick="setFrame('toc-pygeoip.const-module.html','pygeoip.const-module.html');" >pygeoip.const</a><br /> <a target="moduleFrame" href="toc-pygeoip.util-module.html"
onclick="setFrame('toc-pygeoip.const-module.html','pygeoip.const-module.html');" >pygeoip.const</a><br /> <a target="moduleFrame" href="toc-pygeoip.timezone-module.html"
onclick="setFrame('toc-pygeoip.timezone-module.html','pygeoip.timezone-module.html');" >pygeoip.timezone</a><br /> <a target="moduleFrame" href="toc-pygeoip.util-module.html"
onclick="setFrame('toc-pygeoip.util-module.html','pygeoip.util-module.html');" >pygeoip.util</a><br /><hr />
<span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment